.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.dev-label {
    font-size: 0.75rem;
    color: var(--brand);
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}

.user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.9rem;
}

.muted {
    color: var(--muted);
}

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

.field-label {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.field-value {
    font-size: 0.94rem;
}

/* —— App sidebar (Phase 19A: V1-aligned structure) —— */

.app-sidebar .sidebar-nav--dashboard {
    padding-top: 12px;
}

.app-sidebar[data-sidebar-mode="project"] > .sidebar-mode-toggle,
.app-sidebar[data-sidebar-mode="create_project"] > .sidebar-mode-toggle {
    margin-top: 12px;
}

.app-sidebar--project-stub > .sidebar-panels {
    padding-top: 12px;
}

.app-sidebar .sidebar-mode-toggle {
    display: flex;
    margin: 0 12px 12px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    gap: 4px;
    flex-shrink: 0;
}

.app-sidebar .sidebar-mode-button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}

.app-sidebar .sidebar-mode-button.active {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.app-sidebar .sidebar-panels {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.app-sidebar .sidebar-panel-content {
    flex: 1;
    min-height: 0;
}

.app-sidebar .sidebar-panel-content[hidden] {
    display: none !important;
}

.app-sidebar .sidebar-panel-content-navigation:not([hidden]) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.app-sidebar .sidebar-panel-content-context:not([hidden]) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

/* Context tab: collapsed step rail (~108px) + guidance column (remainder of 450px sidebar) */
.app-sidebar .sidebar-context-layout {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    min-width: 0;
    width: 100%;
}

.app-sidebar .sidebar-context-rail {
    flex: 0 0 108px;
    width: 108px;
    min-width: 108px;
    max-width: 108px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 6px 12px;
    border-right: 1px solid #e5e7eb;
    background: #fafafa;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

.app-sidebar .sidebar-context-rail-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 4px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    background: transparent;
    border: none;
    box-sizing: border-box;
    min-height: 0;
}

.app-sidebar .sidebar-context-rail-item:hover {
    background: #f1f5f9;
}

.app-sidebar .sidebar-context-rail-item.active {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.app-sidebar .sidebar-context-rail-icon.nav-step-icon {
    width: 26px;
    height: 26px;
    margin-top: 0;
    flex-shrink: 0;
}

.app-sidebar .sidebar-context-rail .nav-step-icon--partial::after {
    content: "!";
    font-size: 14px;
    font-weight: 900;
    opacity: 1;
}

.app-sidebar .sidebar-context-rail-label {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    word-break: break-word;
    hyphens: auto;
}

.app-sidebar .sidebar-context-rail-item.active .sidebar-context-rail-label {
    color: #ffffff;
}

.app-sidebar .sidebar-context-rail-item.active .nav-step-icon--complete {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.95);
}

.app-sidebar .sidebar-context-rail-item.active .nav-step-icon--complete::after {
    color: #ffffff;
}

.app-sidebar .sidebar-context-rail-item.active .nav-step-icon--partial {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.95);
}

.app-sidebar .sidebar-context-rail-item.active .nav-step-icon--partial::after {
    color: #ffffff;
    content: "!";
}

.app-sidebar .sidebar-context-rail-item.active .nav-step-icon--missing {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.65);
}

.app-sidebar .sidebar-context-rail-item.active .nav-step-icon--missing::after {
    background: rgba(255, 255, 255, 0.85);
}

.app-sidebar .sidebar-context-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: #ffffff;
}

.app-sidebar .sidebar-context-main .context-intelligence-scroll {
    flex: 1;
    min-height: 0;
    padding: 12px 14px;
}

.app-sidebar .sidebar-context-main .context-panel-input-wrap {
    padding: 10px 12px 12px;
}

@media (max-width: 900px) {
    .app-sidebar .sidebar-context-layout {
        flex-direction: column;
    }

    .app-sidebar .sidebar-context-rail {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px 8px 10px;
        gap: 6px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        -webkit-overflow-scrolling: touch;
    }

    .app-sidebar .sidebar-context-rail-item {
        flex: 0 0 auto;
        min-width: 72px;
        padding: 8px 6px;
    }

    .app-sidebar .sidebar-context-rail-label br {
        display: none;
    }

    .app-sidebar .sidebar-context-rail-label {
        white-space: nowrap;
        font-size: 9px;
    }
}

.app-sidebar .sidebar-back {
    display: block;
    padding: 18px 16px;
    text-decoration: none;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.app-sidebar .sidebar-back:hover {
    color: #3b82f6;
}

.app-sidebar .sidebar-section-title {
    padding: 16px;
    font-size: 14px;
    font-weight: 700;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.app-sidebar .sidebar-nav {
    display: flex;
    flex-direction: column;
}

.app-sidebar .sidebar-link {
    display: block;
    padding: 18px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-decoration: none;
    background: #ffffff;
    color: #1f2937;
}

.app-sidebar .sidebar-link:hover {
    background: #f8fafc;
}

.app-sidebar .sidebar-link.active {
    background: #3b82f6;
    color: #ffffff;
}

.app-sidebar .sidebar-link.active .sidebar-link-subtitle {
    color: #ffffff;
    opacity: 0.92;
}

.app-sidebar .sidebar-link-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.app-sidebar .sidebar-link-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.app-sidebar .sidebar-link-subtitle {
    font-size: 14px;
    color: #64748b;
    line-height: 1.35;
}

.app-sidebar .sidebar-link--disabled {
    cursor: default;
    color: #9ca3af;
    background: #ffffff;
}

.app-sidebar .sidebar-link--disabled .sidebar-link-subtitle {
    color: #9ca3af;
}

.app-sidebar .sidebar-link--disabled .sidebar-link-title {
    color: #9ca3af;
}

/* Step status icons (CSS-only) */
.app-sidebar .nav-step-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-top: 2px;
    position: relative;
    box-sizing: border-box;
    border: 2px solid transparent;
}

.app-sidebar .nav-step-icon--complete {
    background: #22c55e;
    border-color: #16a34a;
}

.app-sidebar .nav-step-icon--complete::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.app-sidebar .nav-step-icon--partial {
    background: #f97316;
    border-color: #ea580c;
}

.app-sidebar .nav-step-icon--partial::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    opacity: 0.95;
}

.app-sidebar .nav-step-icon--missing {
    background: #e5e7eb;
    border-color: #cbd5e1;
}

.app-sidebar .nav-step-icon--missing::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.app-sidebar .sidebar-link.active .nav-step-icon--complete {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.95);
}

.app-sidebar .sidebar-link.active .nav-step-icon--complete::after {
    color: #ffffff;
}

.app-sidebar .sidebar-link.active .nav-step-icon--partial {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.95);
}

.app-sidebar .sidebar-link.active .nav-step-icon--partial::after {
    color: #ffffff;
}

.app-sidebar .sidebar-link.active .nav-step-icon--missing {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.65);
}

.app-sidebar .sidebar-link.active .nav-step-icon--missing::after {
    background: rgba(255, 255, 255, 0.85);
}

.app-sidebar .context-intelligence-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

.app-sidebar .context-panel-placeholder {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.app-sidebar .context-panel-input-wrap {
    flex-shrink: 0;
    padding: 12px 16px 16px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.app-sidebar .context-panel-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #94a3b8;
    background: #f1f5f9;
}

/* Context tab — ExLoop Intelligence (scoped under .app-sidebar) */
.app-sidebar .exloop-context-guidance-state {
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
}

.app-sidebar .exloop-context-guidance-error {
    color: #b91c1c;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.app-sidebar .exloop-context-guidance-root {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-sidebar .exloop-context-status-card {
    background: #eff6ff;
    color: #6b7280;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.app-sidebar .exloop-context-status-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.app-sidebar .exloop-context-status-message {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    opacity: 0.95;
}

.app-sidebar .exloop-context-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    padding: 12px;
    margin-top: 12px;
}

.app-sidebar .exloop-context-card-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.app-sidebar .exloop-context-card-body {
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
}

.app-sidebar .exloop-context-card-body p {
    margin: 0 0 10px;
}

.app-sidebar .exloop-context-card-body p:last-child {
    margin-bottom: 0;
}

.app-sidebar .exloop-copy-brief-row {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.app-sidebar .exloop-copy-brief-success {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}

/* Legacy accordion fallback: coaching copy without the blue status card */
.app-sidebar .exloop-context-coach-plain {
    margin: 0 0 12px;
}

.app-sidebar .exloop-context-coach-plain .exloop-context-coach-line {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
}

.app-sidebar .exloop-context-coach-plain .exloop-context-coach-line:last-child {
    margin-bottom: 0;
}

.app-sidebar .exloop-context-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #92400e;
}

.app-sidebar .exloop-context-warning p {
    margin: 0;
}

.app-sidebar .exloop-context-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.app-sidebar .exloop-context-accordion-trigger {
    cursor: pointer;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.app-sidebar .exloop-context-accordion-trigger::-webkit-details-marker {
    display: none;
}

.app-sidebar .exloop-context-accordion > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.app-sidebar .exloop-context-accordion[open] > summary::after {
    transform: rotate(45deg);
}

.app-sidebar .exloop-context-accordion-body {
    padding: 0 12px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
    border-top: 1px solid #f1f5f9;
}

.app-sidebar .exloop-context-accordion-body p {
    margin: 0.5rem 0 0;
}

.app-sidebar .exloop-context-accordion-body p:first-child {
    margin-top: 0.65rem;
}

.app-sidebar .exloop-context-step-list {
    margin: 0.5rem 0 0;
    padding-left: 1.15rem;
}

.app-sidebar .exloop-context-align-before {
    margin-top: 0.75rem;
}

.app-sidebar .exloop-context-align-actions {
    margin: 0.35rem 0 0;
    padding-left: 1.15rem;
}

.app-sidebar .exloop-context-reasoning-summary {
    margin: 0;
}

.app-sidebar .exloop-context-view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.app-sidebar .exloop-context-view-tab {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    font-family: inherit;
}

.app-sidebar .exloop-context-view-tab.is-active {
    background: #eff6ff;
    border-color: #60a5fa;
    color: #1d4ed8;
}

.app-sidebar .exloop-context-view-count {
    display: inline-block;
    min-width: 18px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.app-sidebar .exloop-context-view-panel {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
}

.app-sidebar .exloop-context-view-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.app-sidebar .exloop-context-view-body {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
}

.app-sidebar .exloop-context-view-body p {
    margin: 0.5rem 0 0;
}

.app-sidebar .exloop-context-view-body p:first-child {
    margin-top: 0;
}

.app-sidebar .exloop-context-action-list {
    margin: 0.55rem 0 0;
    padding-left: 1.15rem;
}

.app-breadcrumb {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.app-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.app-breadcrumb a:hover {
    text-decoration: underline;
}

.app-breadcrumb-sep {
    color: #94a3b8;
    padding: 0 0.35rem;
    font-weight: 400;
}

.app-breadcrumb-current {
    color: #334155;
    font-weight: 600;
}

.sidebar-section-label {
    margin: 0.85rem 0 0.35rem;
    padding: 0 0.6rem;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.project-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 1rem;
}

.project-header-content {
    display: grid;
    gap: 0.35rem;
}

.project-header-heading-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.project-header-heading-row h1 {
    margin: 0;
}

.readiness-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.readiness-title-row .project-readiness-card-title {
    margin: 0;
}

.readiness-steps-line {
    margin: 0 0 10px;
    color: #111827;
}

.readiness-progress-bar-container {
    width: 100%;
    height: 16px;
    background: #d1d5db;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.readiness-progress-bar {
    height: 100%;
    background: #2563eb;
    border-radius: 9999px;
}

.readiness-percent-ready {
    margin: 0 0 12px;
}

.readiness-summary-line {
    margin: 0.35rem 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.problem-statement-body {
    white-space: pre-wrap;
    margin: 0;
}

.project-header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--brand-strong);
    border-color: var(--brand-strong);
}

.btn-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: #334155;
}

.btn-secondary:hover {
    border-color: #c5cedd;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #991b1b;
    border-color: #991b1b;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.6rem;
}

.summary-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fcfdff;
    padding: 0.75rem;
}

.summary-label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
}

.summary-value {
    font-size: 1.15rem;
    font-weight: 600;
}

.badge,
.status-badge,
.badge-status,
.chip {
    display: inline-block;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.78rem;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.badge-neutral,
.badge-status,
.status-badge {
    color: #334155;
    background: var(--neutral-soft);
}

.badge-success {
    color: #166534;
    background: var(--success-soft);
    border-color: #86efac;
}

.badge-warning {
    color: var(--warning);
    background: var(--warning-soft);
    border-color: #fdba74;
}

.badge-danger {
    color: #991b1b;
    background: var(--danger-soft);
    border-color: #fecaca;
}

.chip {
    background: #ffffff;
    color: #334155;
}

.projects-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.data-table,
.projects-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table {
    min-width: 980px;
}

.data-table th,
.data-table td,
.projects-table th,
.projects-table td {
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0.65rem;
    text-align: left;
    vertical-align: top;
    font-size: 0.88rem;
}

.data-table th,
.projects-table th {
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

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

.project-row-clickable {
    cursor: pointer;
}

.project-row-clickable:hover td {
    background: #f8fafc;
}

.project-row-clickable:focus td,
.project-row-clickable:focus-visible td {
    outline: 2px solid var(--focus-ring);
    outline-offset: -2px;
    background: #eff6ff;
}

.project-cell-main {
    font-weight: 600;
}

.project-cell-sub {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.project-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}

.project-context-fields {
    display: grid;
    gap: 0.75rem;
}

.readiness-check-list {
    list-style: none;
    margin: 0.9rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.readiness-check-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fcfdff;
}

.data-table .row-clickable,
.project-row-clickable {
    cursor: pointer;
}

.data-table .row-clickable:hover td,
.project-row-clickable:hover td {
    background: #f8fafc;
}

.data-table .row-clickable:focus td,
.data-table .row-clickable:focus-visible td {
    outline: 2px solid var(--focus-ring);
    outline-offset: -2px;
    background: #eff6ff;
}

.error-text {
    color: var(--danger);
    margin-bottom: 0.5rem;
}

#toast-area {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: grid;
    gap: 0.5rem;
    max-width: 340px;
}

.toast {
    border: 1px solid var(--border);
    background: #fff;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

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

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

    .project-overview-grid {
        grid-template-columns: 1fr;
    }

    .project-header {
        grid-template-columns: 1fr;
    }

    .project-header-actions {
        justify-content: flex-start;
    }
}

.bg-empty-state {
    max-width: 32rem;
    margin: 2rem auto;
    text-align: center;
}

.bg-empty-heading {
    margin: 0.5rem 0 0.35rem;
    font-size: 1.15rem;
}

.bg-empty-supporting {
    margin: 0 auto;
    max-width: 26rem;
    line-height: 1.45;
}

.bg-mascot {
    display: block;
    max-width: 220px;
    width: 100%;
    height: auto;
    margin: 0 auto 1rem;
}

.bg-goals-list {
    display: grid;
    gap: 1rem;
    width: 100%;
}

.bg-goal-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.1rem;
    background: #ffffff;
}

.bg-goal-body {
    margin: 0 0 0.75rem;
    white-space: pre-wrap;
    line-height: 1.45;
}

.bg-metric-summary {
    margin: 0;
    padding: 0.55rem 0.75rem;
    background: var(--warning-soft);
    border: 1px solid #fdba74;
    border-radius: 6px;
    font-size: 0.9rem;
}

.bg-metric-summary a {
    font-weight: 600;
    color: var(--warning);
}

.bg-breadcrumb {
    margin: 0 0 0.5rem;
}

.bg-goal-textarea {
    width: 100%;
    max-width: 42rem;
    box-sizing: border-box;
    font: inherit;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    resize: vertical;
    min-height: 6rem;
}

.bg-goal-helper {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
}

.bg-outcome-section {
    margin-top: 1.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
    max-width: 100%;
}

.bg-outcome-section-title {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text, #111827);
}

.bg-outcome-intro {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    line-height: 1.45;
    max-width: 42rem;
}

.bg-outcome-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
    gap: 0.75rem;
    width: 100%;
    max-width: 56rem;
}

.bg-outcome-card {
    position: relative;
    display: block;
    margin: 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface, #fff);
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1.45;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.bg-outcome-card:hover {
    border-color: #94a3b8;
}

.bg-outcome-card-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bg-outcome-card:has(.bg-outcome-card-input:checked) {
    border-color: var(--primary, #2563eb);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 1px var(--primary, #2563eb);
}

.bg-outcome-card:has(.bg-outcome-card-input:focus-visible) {
    outline: 2px solid var(--primary, #2563eb);
    outline-offset: 2px;
}

.bg-outcome-card-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    color: var(--text, #111827);
}

.bg-outcome-card-explanation {
    margin: 0 0 0.45rem;
    font-size: 0.86rem;
    color: var(--text-muted, #475569);
}

.bg-outcome-card-example,
.bg-outcome-card-best {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    color: var(--text-muted, #475569);
}

.bg-outcome-card-example:last-child,
.bg-outcome-card-best:last-child {
    margin-bottom: 0;
}

.bg-outcome-card-kicker {
    font-weight: 600;
    color: var(--text, #334155);
}

.bg-outcome-validation {
    margin: 0.6rem 0 0;
    font-size: 0.9rem;
}

.sm-back-link {
    margin: 0 0 0.5rem;
}

.sm-metrics-list {
    display: grid;
    gap: 1rem;
}

.sm-metric-card {
    width: 100%;
}

.sm-metric-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.sm-metric-head-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    flex: 1 1 auto;
    min-width: 0;
}

.sm-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.sm-statement {
    margin: 0 0 0.85rem;
    white-space: pre-wrap;
    line-height: 1.45;
}

.sm-v2-missing-source {
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    background: #fffbeb;
}

.sm-v2-missing-source-heading {
    margin: 0 0 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.sm-v2-gaps-list {
    margin: 0;
    padding-left: 1.15rem;
}

.sm-v2-gap-item {
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.sm-v2-gap-item:last-child {
    margin-bottom: 0;
}

.sm-v2-gap-why,
.sm-v2-gap-meta {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.sm-v2-gap-kicker {
    font-weight: 600;
}

.sm-badge-v2-indicator,
.sm-badge-v2-source {
    border: 1px solid #cbd5e1;
}

.sm-measurements-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.sm-measurements-table {
    min-width: 640px;
}

.sm-goal-group {
    display: grid;
    gap: 0.75rem;
}

.sm-goal-statement {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.45;
}

.sm-goal-count {
    margin: 0;
}

.sm-goal-metrics {
    display: grid;
    gap: 0.9rem;
}

.sm-goal-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sm-goal-group--highlight {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
    border-radius: 8px;
}

.sm-metric-title {
    margin: 0;
    font-size: 1.05rem;
}

.sm-metric-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.sm-metric-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sm-m-thead-label {
    font-weight: 600;
    text-align: left;
}

.sm-m-read-grid {
    display: grid;
    grid-template-columns: minmax(120px, 1.2fr) minmax(70px, 0.6fr) repeat(3, minmax(80px, 1fr)) auto;
    gap: 0.65rem 0.75rem;
    align-items: start;
}

.sm-m-mini-label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
}

.sm-m-read-val {
    font-size: 0.92rem;
    word-break: break-word;
}

.sm-m-read-actions {
    display: flex;
    gap: 0.35rem;
    align-items: flex-start;
    justify-content: flex-end;
}

.sm-measurement-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.65rem;
    align-items: end;
}

.sm-m-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.sm-icon-btn {
    padding: 6px;
    min-width: 2.25rem;
}

.sm-inline-add-link {
    display: inline-block;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #2563eb;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-align: left;
}

.sm-inline-add-link:hover {
    color: #1d4ed8;
}

.sm-new-metric-slot {
    margin-top: 0.5rem;
}

.sm-goal-add-metric {
    margin-top: 0.25rem;
}

.sm-measurements-footer {
    padding: 0.5rem 0.65rem;
    border-top: 1px solid var(--border);
}

.sm-linked-pain-points-section {
    margin-top: 1rem;
}

.sm-linked-pain-points-heading {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563;
}

.sm-linked-pain-points-empty {
    margin: 0;
    font-style: italic;
}

.sm-linked-pain-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sm-linked-pain-points-item {
    margin: 0;
}

.sm-linked-pain-point-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f9fafb;
    color: inherit;
    text-decoration: none;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.sm-linked-pain-point-card:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.sm-linked-pain-point-card:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.sm-linked-pain-point-text {
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.sm-linked-pain-point-status {
    flex-shrink: 0;
    align-self: center;
    white-space: nowrap;
}

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

.sm-m-empty-line {
    margin: 0;
    font-style: italic;
}

.sm-metric-card--create {
    margin-top: 0.35rem;
}

.sm-measurement-create-block {
    padding: 0.5rem 0;
}

.sm-m-create-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-top: 0.45rem;
}

.sm-icon-btn--save {
    border: 1px solid #16a34a;
    color: #15803d;
}

.sm-icon-btn--cancel {
    border: 1px solid #dc2626;
    color: #b91c1c;
}

@media (max-width: 720px) {
    .sm-m-read-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sm-m-read-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

/* Research tasks (Phase 17A) */
.rt-tasks-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.rt-task-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem;
    background: var(--surface);
}

.rt-task-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.rt-task-desc {
    margin: 0 0 0.35rem;
    white-space: pre-wrap;
    font-size: 0.92rem;
}

.rt-task-meta {
    margin: 0;
    font-size: 0.82rem;
}

.rt-add-panel {
    margin-top: 0.25rem;
}

.rta-form-busy {
    pointer-events: none;
    opacity: 0.65;
}

.rta-all-required-intro {
    margin: 0 0 0.75rem;
    max-width: 42rem;
}

.field-hint {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
}

.rt-tasks-table {
    min-width: 720px;
}

.rt-task-row {
    cursor: pointer;
}

.rt-task-row:hover td {
    background: #f8fafc;
}

.rt-task-row-link {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.rt-task-row-link:hover {
    text-decoration: underline;
}

.rt-view-panel-heading {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.rt-view-dl {
    display: grid;
    grid-template-columns: minmax(8rem, 11rem) 1fr;
    gap: 0.35rem 1rem;
    margin: 0;
}

.rt-view-dl dt {
    margin: 0;
    font-weight: 600;
    color: #475569;
    font-size: 0.88rem;
}

.rt-view-dl dd {
    margin: 0;
    font-size: 0.92rem;
}

.rt-task-desc-cell {
  max-width: 14rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.rt-platform-tasks-cell {
  max-width: 15rem;
  vertical-align: top;
}

.rt-platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.rt-platform-pill {
  display: inline-block;
  padding: 0.12rem 0.42rem;
  border-radius: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.rt-platform-pills-empty {
  color: #64748b;
  font-size: 0.8rem;
  font-style: italic;
}

.rta-platform-task-fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem 1rem;
  margin: 0;
}

.rta-platform-task-groups {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 22rem;
  overflow-y: auto;
  padding: 0.35rem 0 0;
}

.rta-platform-task-group-title {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: #0f172a;
}

.rta-platform-task-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rta-platform-task-row {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.rta-platform-task-row input {
    margin-top: 0.2rem;
}

.pp-measurement-fieldset {
    margin-top: 0.25rem;
}

.pp-measurement-groups {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 22rem;
    overflow-y: auto;
    padding: 0.35rem 0 0;
}

.pp-measurement-metric-title {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.35;
    color: #334155;
    margin-bottom: 0.35rem;
}

.pp-measurement-unit {
    font-size: 0.82rem;
    font-weight: 400;
}

/* Pain point view: details (left) + measurements (right) on wide viewports */
.pp-detail-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    align-items: start;
}

@media (min-width: 60rem) {
    .pp-detail-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.pp-measurements-affected-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pp-measurements-affected-metric-heading {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.pp-measurements-affected-metric-heading a {
    color: #1d4ed8;
    text-decoration: none;
}

.pp-measurements-affected-metric-heading a:hover {
    text-decoration: underline;
}

.pp-measurements-affected-ul {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.pp-measurements-affected-item {
    margin: 0.2rem 0;
}

.rt-success-banner {
    margin: 0.5rem 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 0.92rem;
}

.rt-severity-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.rt-severity-low {
    background: #ecfdf5;
    color: #065f46;
}

.rt-severity-medium {
    background: #fef9c3;
    color: #854d0e;
}

.rt-severity-high {
    background: #ffedd5;
    color: #9a3412;
}

.rt-severity-critical {
    background: #fee2e2;
    color: #991b1b;
}

/* Pain points (Phase 17B) — table row nav mirrors research tasks */
.pp-tasks-table {
    min-width: 920px;
}

.pp-platform-tasks-cell {
    max-width: 14rem;
    vertical-align: top;
}

.pp-list-platform-pills {
    flex-wrap: wrap;
}

.pp-view-platform-wrap {
    margin-top: 0.35rem;
}

.pp-legacy-research-list {
    margin: 0.35rem 0 0;
    padding-left: 1.25rem;
}

.pp-task-row {
    cursor: pointer;
}

.pp-task-row:hover td {
    background: #f8fafc;
}

.pp-task-row-link {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.pp-task-row-link:hover {
    text-decoration: underline;
}

.pp-task-desc-cell {
    max-width: 16rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pp-success-banner {
    margin: 0.5rem 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 0.92rem;
}

/* Create project (Phase 16B) */
#create-project-main {
    background: #f8fafc;
}

.create-project-panel {
    max-width: none;
    margin: 0;
    padding: 1.5rem 1.6rem;
    border-radius: 12px;
}

.create-project-panel-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.create-project-stack {
    display: grid;
    gap: 48px;
    margin-top: 0.75rem;
    justify-items: start;
}

.create-project-field {
    display: grid;
    gap: 0.55rem;
}

.create-project-field fieldset,
fieldset.create-project-field {
    border: 0;
    padding: 0;
    margin: 0;
    min-inline-size: 0;
}

.create-project-guidance-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
}

.create-project-guidance-box .create-project-hint {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--muted);
}

.create-project-guidance-box .create-project-hint + .create-project-hint {
    margin-top: 0.35rem;
}

.create-project-field input[type="text"],
.create-project-field input[type="number"],
.create-project-field input[type="date"],
.create-project-field select,
.create-project-textarea {
    width: 100%;
    max-width: none;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
    background: var(--surface);
}

.create-project-textarea {
    height: 150px;
    min-height: 150px;
    resize: vertical;
}

.create-project-hint {
    margin: 0;
    font-size: 0.85rem;
}

.create-project-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.create-project-checkbox-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1.25rem;
    max-width: none;
}

.create-project-check-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.92rem;
}

@media (max-width: 720px) {
    .create-project-checkbox-list {
        grid-template-columns: 1fr;
    }
}

/* Create project Step 2: wrapper is not a card; two standalone .panel children */
/* #cp-step2 uses the native `hidden` attribute; do not set display:flex without :not([hidden])
   or it overrides the UA hidden stylesheet and Step 2 stays visible on Step 1. */
#create-project-main #cp-step2[hidden] {
    display: none;
}

#create-project-main #cp-step2:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

#create-project-main #cp-summary-card.create-project-summary,
#create-project-main .create-project-problem-card {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}

#create-project-main .create-project-summary {
    margin-bottom: 0;
}

.create-project-summary-title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text, #0f172a);
}

#create-project-main #cp-summary-card .create-project-summary-dl {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

#create-project-main #cp-summary-card .create-project-summary-item {
    min-width: 0;
}

#create-project-main #cp-summary-card .create-project-summary-dl dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    line-height: 1.3;
}

#create-project-main #cp-summary-card .create-project-summary-dl dd {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

#create-project-main .create-project-problem-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#create-project-main .create-project-problem-heading {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text, #0f172a);
}

#create-project-main .create-project-problem-example {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 24px;
}

#create-project-main .create-project-field--problem {
    margin-top: 0.25rem;
}

#create-project-main .create-project-field--problem .create-project-textarea {
    max-width: none;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    line-height: 1.45;
}

#create-project-main .create-project-problem-card #cp-step2-validation {
    margin-top: 0.5rem;
}

#create-project-main .create-project-problem-card .button-row {
    margin-top: 1rem;
}

#create-project-main .create-project-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: 1100px) {
    #create-project-main #cp-summary-card .create-project-summary-dl {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .create-project-dates {
        grid-template-columns: 1fr;
    }

    #create-project-main #cp-summary-card .create-project-summary-dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    #create-project-main #cp-summary-card .create-project-summary-dl {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------------- */
/* Project timeline (Phase 20B) — V1 screenshot reference, V2 schema       */
/* -------------------------------------------------------------------------- */

.timeline-page-header {
    margin: 0 0 1.25rem;
}

.timeline-page-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
}

.timeline-page-subtitle {
    margin: 0;
    max-width: 48rem;
}

#pt-fetch-status {
    margin: 0 0 0.75rem;
}

.panel.timeline-summary-card {
    margin-bottom: 1.25rem;
}

.timeline-summary-card-title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
}

.timeline-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem 1.25rem;
}

.timeline-summary-grid.timeline-summary-grid--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

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

@media (max-width: 480px) {
    .timeline-summary-grid.timeline-summary-grid--compact {
        grid-template-columns: 1fr;
    }
}

.timeline-summary-item--wide {
    grid-column: 1 / -1;
}

.timeline-summary-label {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.timeline-summary-value {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text);
}

.project-tracker-card {
    margin-top: 0;
    margin-bottom: 1.25rem;
    min-width: 0;
    padding: 1.25rem 1.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.project-tracker-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.project-tracker-lead {
    margin: 0;
    max-width: 42rem;
}

.project-tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.project-tracker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tracker-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.tracker-status-green {
    background: #e8f7ed;
    color: #1f7a3d;
}

.tracker-status-orange {
    background: #fff4df;
    color: #b36b00;
}

.tracker-status-red {
    background: #fdeaea;
    color: #b42318;
}

.timeline-empty-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0 4px;
}

.timeline-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.timeline-empty-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    max-width: 480px;
}

.project-tracker-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 420px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.project-tracker-inner {
    min-width: max-content;
}

.tracker-header-row {
    display: flex;
    align-items: stretch;
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.tracker-week-headers {
    display: flex;
    flex: 1;
    min-width: 0;
}

.tracker-cell {
    min-height: 72px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px;
    background: #fff;
    position: relative;
    box-sizing: border-box;
}

.tracker-header {
    font-weight: 600;
    font-size: 12px;
    color: #374151;
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 3;
    white-space: nowrap;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.tracker-phase-header,
.tracker-phase {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}

.tracker-phase-header {
    z-index: 6;
    background: #f9fafb;
    flex: 0 0 160px;
    width: 160px;
    min-width: 160px;
}

.tracker-week-headers > .tracker-cell.tracker-header {
    flex: 1 1 88px;
    min-width: 88px;
}

.tracker-phase {
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    flex: 0 0 160px;
    width: 160px;
    min-width: 160px;
}

.tracker-phase-current {
    background: #f0fdfa;
    color: #0f766e;
}

.tracker-phase-row {
    display: flex;
    align-items: stretch;
    min-height: 72px;
}

.tracker-phase-row:last-child .tracker-week-strip .tracker-week-cell,
.tracker-phase-row:last-child .tracker-phase {
    border-bottom: none;
}

.tracker-track-host {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.tracker-week-strip {
    display: flex;
    flex: 1;
    min-height: 72px;
}

.tracker-week-cell {
    min-height: 72px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    box-sizing: border-box;
}

.tracker-bar-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    pointer-events: none;
    box-sizing: border-box;
}

.tracker-bar-wrapper {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 6px;
    z-index: 1;
    box-sizing: border-box;
}

.tracker-bar {
    display: flex;
    align-items: center;
    width: 100%;
    height: 32px;
    border-radius: 10px;
    overflow: hidden;
    padding: 0 10px;
    box-sizing: border-box;
}

.tracker-bar-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 0;
}

.tracker-bar-planned {
    background: #93c5fd;
}

.tracker-bar-planned .tracker-bar-label {
    color: #1e3a8a;
}

.tracker-bar-complete {
    background: #4f7f58;
}

.tracker-bar-complete .tracker-bar-label {
    color: #ffffff;
}

.tracker-bar-current {
    background: #0f766e;
    box-shadow: 0 0 0 2px #d1fae5;
}

.tracker-bar-current .tracker-bar-label {
    color: #ffffff;
}

.tracker-bar-delayed {
    background: #f59e0b;
}

.tracker-bar-delayed .tracker-bar-label {
    color: #ffffff;
}

.tracker-bar-blocked {
    background: #dc2626;
}

.tracker-bar-blocked .tracker-bar-label {
    color: #ffffff;
}

/* Compound selectors so current-week tint wins over .tracker-header / .tracker-week-cell */
.tracker-week-headers > .tracker-cell.tracker-header.tracker-current-week-header {
    background: #eff6ff;
    color: #1d4ed8;
}

.tracker-week-strip > .tracker-week-cell.tracker-current-week-cell {
    background: #f8fbff;
}

/* —— Timeline edit form (Phase 20C) —— */

.timeline-form-page {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.timeline-form-page-header {
    margin-bottom: 20px;
}

.timeline-form-page-header h1 {
    margin: 0 0 8px;
}

.timeline-form-intro {
    max-width: none;
    margin: 0;
}

.timeline-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.timeline-section {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 22px;
}

.timeline-section-title {
    margin: 0 0 12px;
    font-size: 1.1rem;
}

.timeline-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px 20px;
}

.timeline-field-span-2 {
    grid-column: 1 / -1;
}

.timeline-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.timeline-form .form-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.timeline-form .form-control,
.timeline-form select.form-control,
.timeline-form textarea.form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    color: #111827;
}

.timeline-form textarea.form-control {
    resize: vertical;
    min-height: 72px;
}

/* Timeline edit (20D): readonly ExLoop label + visually hidden native date */
.exloop-date-field-inner {
    position: relative;
    min-width: 0;
}

.timeline-form .exloop-date-display {
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

.timeline-form .exloop-date-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.pte-date-field .form-hint--exloop-date {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.35;
}

.timeline-form-errors {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.timeline-error-line {
    margin: 0;
    font-size: 14px;
}

.timeline-error-line + .timeline-error-line {
    margin-top: 6px;
}

.timeline-phase-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-phase-row,
.phase-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    background: #fff;
}

.timeline-phase-label {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.timeline-phase-move-btn {
    font-size: 14px;
    line-height: 1;
    padding: 8px 10px;
    min-width: 2.25rem;
}

.timeline-phase-move-controls {
    display: flex;
    gap: 6px;
    align-items: end;
    justify-content: flex-start;
}

.timeline-phase-remove-wrap {
    display: flex;
    align-items: end;
    justify-content: flex-end;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    margin: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    line-height: 0;
}

.icon-button:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
}

.icon-button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

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

.timeline-remove-phase-icon {
    display: block;
    vertical-align: middle;
}

.timeline-phase-grid {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(140px, auto) auto;
    gap: 12px;
    align-items: end;
    min-width: 0;
}

@media (max-width: 1100px) {
    .timeline-phase-grid {
        overflow-x: auto;
        padding-bottom: 4px;
    }
}

@media (max-width: 720px) {
    .timeline-phase-grid {
        grid-template-columns: 1fr;
        overflow-x: visible;
    }

    .timeline-phase-grid .timeline-phase-move-controls {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .timeline-phase-grid .timeline-phase-name-field {
        grid-column: 1 / -1;
    }

    .timeline-phase-grid .timeline-phase-current-wrap,
    .timeline-phase-grid .timeline-phase-remove-wrap {
        grid-column: 1 / -1;
    }
}

.timeline-phase-current-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.timeline-radio-label input {
    width: auto;
}

.timeline-phase-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.timeline-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    align-items: center;
}

.timeline-form-actions--footer {
    justify-content: flex-end;
}

.timeline-save-success {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
    background: #ecfdf5;
    color: #065f46;
    font-size: 14px;
}

/* -------------------------------------------------------------------------
   Project Report (project-level reporting; browser print-to-PDF)
   ------------------------------------------------------------------------- */

.pr-panel {
    max-width: 100%;
}

.pr-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.pr-toolbar-left {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.pr-toolbar-right {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.pr-snapshot-label {
    margin: 0;
}

.pr-snapshot-select {
    width: 100%;
    max-width: 26rem;
    box-sizing: border-box;
    font: inherit;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface, #fff);
}

.pr-report {
    max-width: 56rem;
}

.pr-report.pr-sheet {
    --pr-accent: var(--brand, #2563eb);
    --pr-border: #e5e7eb;
    --pr-muted-bg: #f3f4f6;
    --pr-sheet-bg: #ffffff;
    padding: 1.25rem 1.35rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--pr-border);
    background: var(--pr-sheet-bg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.pr-report-header {
    margin: 0 0 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--pr-border);
}

.pr-report-title {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    line-height: 1.25;
    font-weight: 700;
    color: #111827;
}

.pr-report-meta {
    margin: 0;
    font-size: 0.92rem;
    color: #6b7280;
}

.pr-section {
    margin-top: 1.35rem;
    padding: 1rem 1rem 1.1rem;
    border-radius: 10px;
    border: 1px solid var(--pr-border, #e5e7eb);
    background: #f9fafb;
}

.pr-summary-section {
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
}

.pr-section-heading {
    margin: 0 0 0.35rem;
}

.pr-section-heading h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}

.pr-section-rule {
    height: 2px;
    margin-top: 0.45rem;
    border-radius: 2px;
    background: var(--pr-accent, #2563eb);
    max-width: 100%;
}

.pr-section-lede {
    margin: 0.35rem 0 0.85rem;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.45;
}

.pr-section-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.pr-subsection-title {
    margin: 1rem 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

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

@media (max-width: 720px) {
    .pr-summary-top {
        grid-template-columns: 1fr;
    }
}

.pr-summary-tile {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--pr-border, #e5e7eb);
    background: #ffffff;
}

.pr-summary-tile-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 6px;
}

.pr-summary-tile-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
}

.pr-context-card {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--pr-border, #e5e7eb);
    background: #ffffff;
}

.pr-context-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 14px;
    margin-top: 10px;
}

.pr-context-row:first-child {
    margin-top: 0;
}

.pr-context-row--stack {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.pr-context-label {
    flex: 0 0 7.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
}

.pr-context-value {
    flex: 1;
    min-width: 0;
}

.pr-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.pr-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    border: 1px solid transparent;
}

.pr-pill--accent {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.pr-pill--soft {
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.pr-problem-statement {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #1f2937;
}

.pr-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
}

.pr-badge--success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
}

.pr-badge--warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.pr-badge--muted {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.pr-badge--neutral {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #e0e7ff;
}

.pr-badge--accent {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.pr-badge--draft {
    background: #faf5ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

.pr-badge--danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.pr-readiness {
    margin-top: 4px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--pr-border, #e5e7eb);
    background: #ffffff;
}

.pr-readiness-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.pr-readiness-summary-line {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.pr-readiness-percent {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pr-accent, #2563eb);
}

.pr-readiness-bar {
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.pr-readiness-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--pr-accent, #2563eb);
    transition: width 0.2s ease;
}

.pr-readiness-status-label {
    margin: 8px 0 0;
    font-size: 0.88rem;
    color: #4b5563;
}

.pr-readiness-card {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.pr-readiness-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.pr-readiness-chips.pr-readiness-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.pr-readiness-chip {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    max-width: 100%;
}

.pr-readiness-chip--done {
    background: #ecfdf5;
    color: #047857;
    border-color: #bbf7d0;
}

.pr-readiness-chip--missing {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.pr-card {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--pr-border, #e5e7eb);
    border-radius: 10px;
    background: #ffffff;
}

.pr-goal-title-col {
    flex: 1;
    min-width: 0;
}

.pr-goal-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.pr-goal-heading {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
    margin: 0;
}

.pr-goal-card .pr-goal-heading {
    margin: 0;
}

.pr-goal-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.pr-kv-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 0;
}

.pr-kv-table th,
.pr-kv-table td {
    text-align: left;
    vertical-align: top;
    padding: 8px 10px;
    border-bottom: 1px solid var(--pr-border, #e5e7eb);
    font-size: 0.9rem;
}

.pr-kv-table th {
    width: 11rem;
    color: #4b5563;
    font-weight: 600;
}

.pr-metric-card {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fafafa;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.pr-metric-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.45rem;
}

.pr-metric-heading {
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #111827;
    margin: 0 0 0.65rem;
}

.pr-metric-meta {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 4px 10px;
    margin: 0;
    font-size: 0.86rem;
}

.pr-metric-meta dt {
    margin: 0;
    color: #6b7280;
    font-weight: 600;
}

.pr-metric-meta dd {
    margin: 0;
    color: #111827;
}

.pr-measurements-wrap {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.pr-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.pr-table th,
.pr-table td {
    text-align: left;
    vertical-align: top;
    padding: 7px 9px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.84rem;
}

.pr-table thead th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.pr-table--measurements tbody tr:last-child td {
    border-bottom: none;
}

.pr-list {
    margin: 8px 0 0;
    padding-left: 1.1rem;
}

.pr-list--tight li {
    margin: 4px 0;
}

.pr-list li {
    margin: 6px 0;
}

.pr-research-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 4px;
}

@media (max-width: 720px) {
    .pr-research-grid {
        grid-template-columns: 1fr;
    }
}

.pr-research-cell {
    min-width: 0;
}

.pr-empty-card {
    text-align: center;
    padding: 1.35rem 1rem 1.45rem;
    border-radius: 10px;
    border: 1px dashed #d1d5db;
    background: #ffffff;
    min-height: 9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.pr-empty-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    margin-bottom: 10px;
}

.pr-empty-card-title {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #374151;
}

.pr-empty-card-body {
    margin: 0;
    max-width: 22rem;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #6b7280;
}

.pr-filled-card {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--pr-border, #e5e7eb);
    background: #ffffff;
    min-height: 6rem;
}

.pr-filled-card-title {
    margin: 0 0 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #374151;
}

.pr-pain-list {
    margin-top: 4px;
    padding: 10px 14px 10px 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--pr-border, #e5e7eb);
    background: #ffffff;
}

.pr-timeline-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0.65rem;
    padding: 10px 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--pr-border, #e5e7eb);
}

.pr-timeline-summary-strip--in-gantt {
    margin-top: 0;
}

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

.pr-timeline-strip-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.pr-timeline-strip-value {
    margin-top: 4px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #111827;
}

/* -------------------------------------------------------------------------
   Project report Gantt (timeline phases — always chart layout, not cards)
   ------------------------------------------------------------------------- */

.pr-gantt-chart {
    margin-top: 0.35rem;
}

.pr-gantt-card {
    border-radius: 10px;
    border: 1px solid var(--pr-border, #e5e7eb);
    background: #ffffff;
    padding: 10px 12px 12px;
}

.pr-gantt-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pr-gantt-inner {
    min-width: 680px;
}

.pr-gantt-grid-header {
    display: grid;
    grid-template-columns: 11.5rem minmax(0, 1fr);
    column-gap: 12px;
    align-items: end;
    padding-bottom: 4px;
    border-bottom: 1px solid #e5e7eb;
}

.pr-gantt-corner {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    padding-bottom: 2px;
}

.pr-gantt-scale {
    min-width: 0;
}

.pr-gantt-scale-rail {
    position: relative;
    height: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.pr-gantt-scale-labels {
    position: relative;
    height: 1.4rem;
    margin-top: 2px;
}

.pr-gantt-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e5e7eb;
    transform: translateX(-0.5px);
}

.pr-gantt-tick-label {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 0.68rem;
    color: #6b7280;
    white-space: nowrap;
}

.pr-gantt-synthetic-note {
    margin: 6px 0 10px;
    font-size: 0.82rem;
    line-height: 1.4;
}

.pr-gantt-body-row {
    display: grid;
    grid-template-columns: 11.5rem minmax(0, 1fr);
    column-gap: 12px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.pr-gantt-body-row:last-child {
    border-bottom: none;
}

.pr-gantt-label-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.pr-gantt-phase-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #111827;
    line-height: 1.3;
}

.pr-gantt-track-col {
    min-width: 0;
}

.pr-gantt-track-rail {
    position: relative;
    height: 30px;
    border-radius: 8px;
    background: #f3f4f6;
    overflow: hidden;
}

.pr-gantt-gridline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(17, 24, 39, 0.06);
    transform: translateX(-0.5px);
}

.pr-gantt-bar-planned {
    position: absolute;
    top: 5px;
    height: 18px;
    left: var(--gantt-left, 0%);
    width: var(--gantt-width, 12%);
    min-width: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.28);
    z-index: 1;
}

.pr-gantt-bar-actual {
    position: absolute;
    top: 8px;
    height: 12px;
    left: var(--gantt-left, 0%);
    width: var(--gantt-width, 12%);
    min-width: 4px;
    border-radius: 999px;
    background: rgba(30, 58, 138, 0.95);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.pr-gantt-unscheduled {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #4b5563;
    background: repeating-linear-gradient(
        -45deg,
        #f9fafb,
        #f9fafb 7px,
        #eef2f7 7px,
        #eef2f7 14px
    );
}

.pr-gantt-row-meta {
    margin-top: 5px;
    font-size: 0.76rem;
    line-height: 1.35;
    color: #6b7280;
}

.pr-gantt-row-note {
    margin-top: 4px;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #374151;
}

.pr-gantt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    font-size: 0.78rem;
    color: #4b5563;
}

.pr-gantt-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.pr-gantt-legend-swatch {
    width: 18px;
    height: 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pr-gantt-legend-swatch--planned {
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.pr-gantt-legend-swatch--actual {
    background: #1e3a8a;
}

.pr-gantt-empty-chart {
    padding: 1.25rem 12px;
    text-align: center;
    font-size: 0.9rem;
}

.pr-timeline-comments-block {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pr-border, #e5e7eb);
}

.pr-timeline-comments-empty {
    margin: 0.25rem 0 0;
}

/* -------------------------------------------------------------------------
   Project Summary — stacked full-width cards (overview + report)
   ------------------------------------------------------------------------- */

.project-summary-grid {
    display: block;
}

.project-summary-grid > * {
    width: 100%;
}

.project-summary-grid > * + * {
    margin-top: 32px;
}

.project-summary-panel .project-summary-lede {
    margin-bottom: 1rem;
}

.project-context-layout {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.project-context-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.project-context-field--full {
    width: 100%;
}

.project-context-card-title,
.project-readiness-card-title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}

.project-report-document .pr-project-summary-grid {
    display: block;
}

.project-report-document .pr-project-summary-grid > * {
    width: 100%;
}

.project-report-document .pr-project-summary-grid > * + * {
    margin-top: 32px;
}

.project-report-document .pr-project-summary-pair {
    width: 100%;
}

.project-report-document .pr-project-summary-pair > * + * {
    margin-top: 32px;
}

.project-report-document .pr-project-context-layout {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.project-report-document .pr-readiness-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.project-report-document .pr-readiness-title-row .pr-card-title,
.project-report-document .pr-readiness-title-row .pr-readiness-title-row__heading {
    margin-top: 0;
    margin-bottom: 0;
}

.project-report-document .pr-project-context-card.pr-card {
    padding: 22px 26px;
}

.project-report-document .pr-project-context-card > .pr-card-title {
    margin-bottom: 16px;
}

.project-report-document .pr-readiness-card .pr-readiness-lead {
    margin-bottom: 16px;
}

.project-report-document .pr-readiness-card .pr-readiness-count-line {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

@page {
    size: A4 portrait;
    margin: 14mm;
}

/* -------------------------------------------------------------------------
   Project report — approved print template (scoped, matches static reference)
   ------------------------------------------------------------------------- */

.project-report-document.pr-report.pr-sheet {
    max-width: none;
    padding: 0;
    border: none;
    box-shadow: none;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
}

.project-report-document .pr-page-section {
    padding: 64px;
}

.project-report-document .pr-cover-page {
    padding-top: 40vh;
}

.project-report-document .pr-cover-title {
    font-size: 60px;
    font-weight: bold;
    margin-bottom: 24px;
    line-height: 1.2;
}

.project-report-document .pr-cover-subtitle {
    font-size: 24px;
    color: #6b7280;
}

.project-report-document .pr-section-header {
    margin-bottom: 48px;
}

.project-report-document .pr-section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 16px;
    border-bottom: 4px solid #2563eb;
}

.project-report-document .pr-section-description {
    font-size: 18px;
    font-weight: 400;
    color: #6b7280;
}

.project-report-document .pr-section-description--tight {
    margin-bottom: 24px;
}

.project-report-document .pr-card {
    background: #f9fafb;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 40px;
}

.project-report-document .pr-card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    color: #1a1a1a;
}

.project-report-document .pr-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.project-report-document .pr-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.project-report-document .pr-timeline-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 48px;
}

.project-report-document .pr-inline-context-row {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #1a1a1a;
}

.project-report-document .pr-inline-context-row:last-child {
    margin-bottom: 0;
}

.project-report-document .pr-inline-context-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0;
    text-transform: none;
}

.project-report-document .pr-field-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 8px;
}

.project-report-document .pr-field-value {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 600;
}

.project-report-document .pr-field-value--muted {
    color: #6b7280;
}

.project-report-document .pr-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    border: none;
}

.project-report-document .pr-badge--amber {
    background: #fef3c7;
    color: #92400e;
}

.project-report-document .pr-badge--green {
    background: #d1fae5;
    color: #065f46;
}

.project-report-document .pr-badge--blue {
    background: #dbeafe;
    color: #1e40af;
    border-radius: 8px;
}

.project-report-document .pr-badge--purple {
    background: #e9d5ff;
    color: #6b21a8;
}

.project-report-document .pr-badge--gray {
    background: #f3f4f6;
    color: #374151;
    border-radius: 8px;
}

.project-report-document .pr-status-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.project-report-document .pr-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
}

.project-report-document .pr-status-badge--done {
    background: #d1e7dd;
}

.project-report-document .pr-status-badge--missing {
    background: #ffeaae;
}

.project-report-document .pr-status-badge__label {
    font-size: 14px;
    font-weight: 600;
    color: #0a3622;
}

.project-report-document .pr-status-badge__pill {
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 12px;
    color: #000000;
}

.project-report-document .pr-status-badge__pill--done {
    background: #68cb9e;
}

.project-report-document .pr-status-badge__pill--missing {
    background: #ffca36;
}

.project-report-document .badge,
.project-report-document .pr-badge,
.project-report-document .status-badge,
.project-report-document .status-badge-label,
.project-report-document .status-badge-status,
.project-report-document .pr-status-badge,
.project-report-document .pr-status-badge__label,
.project-report-document .pr-status-badge__pill {
    font-size: 12px;
}

.project-report-document .pr-stack-8 > * + * {
    margin-top: 32px;
}

.project-report-document .pr-flex-gap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.project-report-document .pr-problem-statement {
    background: #ffffff;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    padding: 24px;
    font-size: 16px;
    line-height: 1.7;
}

.project-report-document .pr-progress-bar-container {
    width: 100%;
    height: 16px;
    background: #d1d5db;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.project-report-document .pr-progress-bar {
    height: 100%;
    background: #2563eb;
    border-radius: 9999px;
}

.project-report-document .pr-progress-text {
    font-size: 16px;
    color: #374151;
    font-weight: 500;
}

.project-report-document .pr-goal-section {
    margin-top: 48px;
    margin-bottom: 48px;
}

.project-report-document .pr-goal-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: #374151;
    margin: 0 0 8px;
}

.project-report-document .pr-goal-heading {
    font-size: 24px;
    font-weight: bold;
    color: #1a1a1a;
    margin: 0 0 12px;
    line-height: 1.3;
}

.project-report-document .pr-goal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 16px;
}

.project-report-document .pr-goal-summary {
    font-size: 14px;
    color: #6b7280;
}

.project-report-document .pr-goal-success {
    font-size: 16px;
    color: #374151;
    margin: 0 0 20px;
    line-height: 1.6;
}

.project-report-document .pr-metric-section {
    margin-top: 48px;
    margin-bottom: 48px;
    padding-top: 48px;
    border-top: 1px solid #e5e7eb;
}

.project-report-document .pr-metric-section:first-of-type {
    margin-top: 48px;
}

.project-report-document .pr-metric-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
}

.project-report-document .plr-metric-label-row,
.project-report-document .pr-metric-heading-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.project-report-document .plr-metric-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
}

.project-report-document .pr-badge.pr-badge--amber {
    background: #fef3c7;
    color: #92400e;
}

.project-report-document .pr-badge.pr-badge--green {
    background: #d1fae5;
    color: #065f46;
}

.project-report-document .pr-metric-heading {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.7;
    color: #1a1a1a;
    margin: 0 0 14px;
}

.project-report-document .pr-metric-gap-callout {
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 3px solid #c4b5fd;
    background: #f5f3ff;
    border-radius: 0 6px 6px 0;
}

.project-report-document .pr-metric-gap-callout-heading {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #5b21b6;
}

.project-report-document .pr-metric-gap-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.project-report-document .pr-metric-gap-item {
    margin-bottom: 10px;
}

.project-report-document .pr-metric-gap-item:last-child {
    margin-bottom: 0;
}

.project-report-document .pr-metric-gap-why,
.project-report-document .pr-metric-gap-meta {
    margin: 4px 0 0;
    font-weight: 400;
    color: #4b5563;
}

.project-report-document .pr-metric-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.project-report-document .pr-metric-source {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px;
    line-height: 1.5;
}

.project-report-document .pr-metric-meta strong,
.project-report-document .pr-metric-source strong {
    font-weight: 600;
}

.project-report-document .pr-report-data-table-container,
.project-report-document .pr-measurement-table-container,
.project-report-document .pr-pain-point-table-container,
.project-report-document .pr-research-task-table-container {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px 18px;
}

.project-report-document .pr-measurement-table-title {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 12px;
}

.project-report-document .pr-measurement-block {
    margin-top: 32px;
}

.project-report-document .pr-measurement-block + .pr-measurement-block {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.project-report-document .pr-measurement-heading-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.project-report-document .pr-measurement-heading-row .pr-measurement-label {
    margin-bottom: 0;
}

.project-report-document .pr-measurement-primary {
    margin-bottom: 24px;
}

.project-report-document .pr-measurement-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
}

.project-report-document .pr-measurement-name {
    font-size: 16px;
    color: #1a1a1a;
    line-height: 1.6;
    max-width: 100%;
}

.project-report-document .pr-measurement-values-table {
    width: 100%;
    table-layout: fixed;
}

.project-report-document .pr-measurement-values-table th,
.project-report-document .pr-measurement-values-table td {
    width: 25%;
}

.project-report-document .pr-measurement-data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.project-report-document .pr-measurement-data-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    text-transform: none;
    letter-spacing: 0;
    padding: 0 10px 16px 0;
    border-bottom: 2px solid #d1d5db;
    vertical-align: bottom;
    word-wrap: break-word;
}

.project-report-document .pr-measurement-data-table th:last-child {
    padding-right: 0;
}

.project-report-document .pr-measurement-data-table td {
    padding: 16px 10px 16px 0;
    vertical-align: top;
    font-size: 16px;
    color: #1a1a1a;
}

.project-report-document .pr-measurement-data-table td:last-child {
    padding-right: 0;
}

.project-report-document .pr-measurement-data-table th:nth-child(4),
.project-report-document .pr-measurement-data-table td:nth-child(4),
.project-report-document .pr-measurement-data-table th:nth-child(5),
.project-report-document .pr-measurement-data-table td:nth-child(5) {
    min-width: 5rem;
}

.project-report-document .pr-pain-point-block {
    margin-top: 24px;
}

.project-report-document .pr-pain-point-block + .pr-pain-point-block {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid #e5e7eb;
}

.project-report-document .pr-pain-point-title {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    text-transform: none;
    letter-spacing: 0;
    margin: 0 0 28px;
}

.project-report-document .pr-pain-point-primary {
    margin-bottom: 32px;
}

.project-report-document .pr-pain-point-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 16px;
}

.project-report-document .pr-pain-point-description {
    font-size: 16px;
    color: #1a1a1a;
    line-height: 1.7;
    max-width: 100%;
}

.project-report-document .pr-pain-point-values-table {
    width: 100%;
    table-layout: fixed;
}

.project-report-document .pr-pain-point-values-table th,
.project-report-document .pr-pain-point-values-table td {
    width: 25%;
}

.project-report-document .pr-research-task-block {
    margin-top: 24px;
}

.project-report-document .pr-research-task-block + .pr-research-task-block {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid #e5e7eb;
}

.project-report-document .pr-research-task-title {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    text-transform: none;
    letter-spacing: 0;
    margin: 0 0 28px;
}

.project-report-document .pr-research-task-primary {
    margin-bottom: 32px;
}

.project-report-document .pr-research-task-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 16px;
}

.project-report-document .pr-research-task-description {
    font-size: 16px;
    color: #1a1a1a;
    line-height: 1.7;
    max-width: 100%;
}

.project-report-document .pr-research-task-values-table {
    width: 100%;
    table-layout: fixed;
}

.project-report-document .pr-research-task-values-table th,
.project-report-document .pr-research-task-values-table td {
    width: 33.333%;
}

.project-report-document .pr-muted-value {
    color: #9ca3af;
    font-style: italic;
    font-size: 14px;
}

.project-report-document .pr-empty-state {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 64px;
    text-align: center;
}

.project-report-document .pr-empty-state-icon {
    width: 80px;
    height: 80px;
    background: #e5e7eb;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-report-document .pr-empty-state-icon svg {
    width: 40px;
    height: 40px;
    color: #9ca3af;
}

.project-report-document .pr-empty-state-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.project-report-document .pr-empty-state-description {
    font-size: 18px;
    color: #6b7280;
    line-height: 1.7;
}

.project-report-document .pr-simple-list {
    margin: 8px 0 0;
    padding-left: 1.25rem;
    color: #1a1a1a;
    font-size: 16px;
    line-height: 1.6;
}

.project-report-document .pr-pain-list-plain {
    list-style: disc;
}

.project-report-document .pr-timeline-comments {
    margin-top: 40px;
}

.project-report-document .pr-timeline-comments-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.project-report-document .pr-timeline-comments-empty {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.project-report-document .project-tracker-title {
    font-weight: 700;
}

.project-report-document .tracker-header {
    text-transform: none;
    letter-spacing: 0;
}

.project-report-document .pr-metrics-section-lead .pr-goal-section:last-child {
    margin-bottom: 0;
}

@media (max-width: 960px) {
    .project-report-document .pr-grid-3,
    .project-report-document .pr-grid-4 {
        grid-template-columns: 1fr;
    }

    .project-report-document .pr-page-section {
        padding: 32px 20px;
    }

    .project-report-document .pr-cover-title {
        font-size: 36px;
    }
}

@media screen and (max-width: 520px) {
    .project-report-document .pr-timeline-summary-grid {
        grid-template-columns: 1fr;
    }
}

.print-page-break {
    margin-top: 22px;
}

@media print {
    /* Hide app shell chrome and controls */
    .app-header,
    .app-sidebar,
    .pr-toolbar,
    .btn,
    .bg-breadcrumb,
    .pr-breadcrumb {
        display: none !important;
    }

    body {
        background: #ffffff !important;
    }

    .app-shell,
    .app-body,
    .app-main {
        background: #ffffff !important;
    }

    .app-main {
        padding: 0 !important;
    }

    .panel {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        background: transparent !important;
    }

    .pr-report {
        max-width: none !important;
    }

    .pr-report.pr-sheet {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    html,
    body {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .pr-section,
    .pr-table,
    .pr-kv-table,
    .pr-gantt-body-row,
    .pr-gantt-chart,
    .pr-gantt-card,
    .pr-gantt-scroll,
    .pr-readiness,
    .pr-empty-card,
    .pr-filled-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .project-report-document .pr-page-section {
        padding-top: 6mm;
        padding-bottom: 10mm;
        padding-left: 0;
        padding-right: 0;
        break-after: page;
        page-break-after: always;
    }

    .project-report-document .pr-page-section:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .project-report-document .pr-cover-page {
        padding-top: 20mm;
    }

    .project-report-document .pr-section-header {
        margin-bottom: 28px;
        break-after: avoid;
        page-break-after: avoid;
    }

    .project-report-document .pr-section-title {
        font-size: 28px;
        line-height: 1.15;
        font-weight: 700;
        margin-bottom: 8px;
        padding-bottom: 10px;
    }

    .project-report-document .pr-section-description {
        font-size: 14px;
        font-weight: 400;
    }

    .project-report-document .pr-card {
        margin-bottom: 28px;
    }

    .project-report-document .pr-timeline-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .project-report-document .pr-project-summary-grid,
    .project-report-document .project-summary-grid {
        display: block;
    }

    .project-report-document .pr-project-summary-grid > *,
    .project-report-document .project-summary-grid > * {
        width: 100%;
    }

    .project-report-document .pr-project-summary-grid > * + *,
    .project-report-document .project-summary-grid > * + * {
        margin-top: 32px;
    }

    .project-report-document .pr-project-summary-pair > * + * {
        margin-top: 32px;
    }

    .project-report-document .pr-project-summary-pair {
        width: 100%;
        break-inside: avoid;
        page-break-inside: avoid;
        break-before: auto;
        page-break-before: auto;
        break-after: auto;
        page-break-after: auto;
    }

    .project-report-document .pr-project-summary-pair .pr-project-context-card,
    .project-report-document .pr-project-summary-pair .pr-readiness-card {
        break-inside: auto;
        page-break-inside: auto;
    }

    .project-report-document .pr-readiness-title-row {
        margin-bottom: 18px;
    }

    .project-report-document .pr-project-context-card,
    .project-report-document .pr-readiness-card,
    .project-report-document .project-context-card,
    .project-report-document .project-readiness-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .project-report-document .pr-metrics-section-lead > .pr-section-header {
        break-after: avoid;
        page-break-after: avoid;
    }

    .project-report-document .pr-metric-section,
    .project-report-document .pr-print-keep-together {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .project-report-document .pr-metric-heading-row,
    .project-report-document .pr-metric-heading,
    .project-report-document .pr-metric-source {
        break-after: avoid;
        page-break-after: avoid;
    }

    .project-report-document .pr-measurement-host {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .project-report-document .pr-goal-first-page-block {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .project-report-document .pr-goal-intro {
        break-after: avoid;
        page-break-after: avoid;
    }

    .project-report-document .pr-goal-label,
    .project-report-document .pr-goal-heading,
    .project-report-document .pr-goal-meta,
    .project-report-document .pr-goal-summary {
        break-after: avoid;
        page-break-after: avoid;
    }

    .project-report-document .pr-card,
    .project-report-document .pr-empty-state,
    .project-report-document .project-tracker-card,
    .project-report-document .pr-problem-statement,
    .project-report-document .pr-report-data-table-container,
    .project-report-document .pr-measurement-table-container,
    .project-report-document .pr-pain-point-table-container,
    .project-report-document .pr-research-task-table-container,
    .project-report-document .pr-research-task-block {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .project-report-document .project-tracker-scroll {
        overflow: visible;
        max-height: none;
    }

    .project-report-document .project-tracker-inner {
        min-width: 0;
        width: 100%;
    }

    .project-report-document .tracker-phase-row,
    .project-report-document .tracker-header-row {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .project-report-document .pr-measurement-block {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .project-report-document .pr-pain-point-block {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .project-report-document .pr-page-section--metrics .pr-report-data-table-container {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .project-report-document .pr-page-section--metrics .pr-measurement-data-table thead {
        display: table-header-group;
    }

    .project-report-document .pr-page-section--metrics .pr-measurement-data-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .print-page-break {
        break-before: page;
        page-break-before: always;
    }
}

/* Auth login page (scoped to avoid conflicts with app forms) */
body.auth-page {
    min-height: 100vh;
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.auth-page h1,
body.auth-page h2,
body.auth-page p {
    margin: 0;
}

.auth-page .auth-container {
    width: 100%;
    max-width: 900px;
}

.auth-page .auth-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 340px 1fr;
    overflow: hidden;
}

.auth-page .auth-side {
    background: linear-gradient(135deg, #f8f9fa 0%, #f3f4f6 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.auth-page .auth-brand {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 24px;
}

.auth-page .brand-title {
    font-size: 28px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.2;
}

.auth-page .brand-tagline {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.auth-page .auth-benefits {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-page .benefits-intro {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    font-weight: 500;
}

.auth-page .benefits-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-page .benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.auth-page .benefit-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: #3b82f6;
    width: 20px;
    height: 20px;
}

.auth-page .auth-main {
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.auth-page .auth-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-page .auth-title {
    font-size: 28px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.3;
}

.auth-page .auth-subtitle {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
}

.auth-page .auth-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-page .auth-message p {
    margin: 0;
}

.auth-page .auth-message-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.auth-page .auth-message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-page .auth-message-error .message-icon {
    color: #dc2626;
}

.auth-page .message-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: #3b82f6;
    width: 20px;
    height: 20px;
}

.auth-page .auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-page .form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
}

.auth-page .form-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
    color: #1a1a1a;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.auth-page .form-input::placeholder {
    color: #9ca3af;
}

.auth-page .form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-page .form-input:read-only {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.auth-page .auth-button {
    width: 100%;
    height: 44px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.auth-page .auth-button:hover {
    background: #2563eb;
}

.auth-page .auth-button:active {
    background: #1d4ed8;
    transform: translateY(1px);
}

.auth-page .auth-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.auth-page .auth-support {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.auth-page .auth-resend-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.auth-page .auth-resend-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.auth-page .auth-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.auth-page .auth-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.auth-page .auth-link-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
}

.auth-page .support-note {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}

@media (max-width: 768px) {
    body.auth-page {
        padding: 16px;
    }

    .auth-page .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-page .auth-side {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        padding: 32px 24px;
        gap: 32px;
    }

    .auth-page .auth-main {
        padding: 32px 24px;
        gap: 24px;
    }

    .auth-page .auth-title,
    .auth-page .brand-title {
        font-size: 24px;
    }

    .auth-page .benefits-intro,
    .auth-page .benefits-list li {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    body.auth-page {
        padding: 12px;
    }

    .auth-page .auth-side {
        padding: 24px 20px;
        gap: 24px;
    }

    .auth-page .auth-main {
        padding: 24px 20px;
        gap: 20px;
    }

    .auth-page .auth-title,
    .auth-page .brand-title {
        font-size: 22px;
    }

    .auth-page .form-input,
    .auth-page .auth-button {
        height: 48px;
        font-size: 16px;
    }
}

/* User research activity form */
.ur-phase-fieldset,
.ur-audience-fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.ur-phase-cards {
    margin-top: 0.5rem;
}

.ur-audience-check-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.ur-results-heading {
    margin-top: 0.5rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border);
}

.ur-results-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.auth-shell--select-org .auth-card--wide {
    max-width: 36rem;
}

.org-select-list {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.org-select-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.org-select-card-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
}

.org-select-card-body {
    min-width: 0;
}

.ur-report-link-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--brand-strong);
    background: var(--brand-soft);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.ur-report-link {
    word-break: break-all;
}
