/* =============================================================================
   js/lifecycle/lifecycle.css — WP02 (lifecycle-real-data-01KX7K0P)

   Styling for the real-data Lifecycle section (js/lifecycle/lifecycle_view.js,
   rendered inside the auto-created #lifecycle-host .overlay-host).

   SCOPE RULE: every selector is prefixed with .lifecycle-view — the root
   container LifecycleView.render() creates inside its host. Nothing here can
   leak into other sections. Removing this file degrades the section to
   plain-but-usable markup (graceful).

   TOKENS: only --color-* / --radius-* app tokens (with literal fallbacks equal
   to the token values) — no new palette. Pill/chip hexes reuse the EntityLabel
   TYPE_COLOR_FALLBACK 700-shades + the canonical reporting badge pairs.

   CONTRAST (WCAG AA ≥ 4.5:1 — house convention: ratio documented per pair;
   verified with UIContrast.contrastRatio, see the WP02 handoff):
     page/card titles      #0f172a / #ffffff → 17.85:1 ✓  (#f8fafc → 17.06:1 ✓)
     soft text             #475569 / #ffffff →  7.58:1 ✓
     muted-on-white only   #64748b / #ffffff →  4.76:1 ✓ (never on tinted bg)
     stage pill (OP)       #ffffff / #4338ca →  7.90:1 ✓  (charter rule 8)
     stage pill (DP)       #ffffff / #0f766e →  5.47:1 ✓
     stage pill (closeout) #ffffff / #b45309 →  5.02:1 ✓
     stage pill (rejected) #ffffff / #b91c1c →  6.47:1 ✓
     signal chip (chase)   #ffffff / #b91c1c →  6.47:1 ✓  (charter rule 8)
     signal chip (warn)    #ffffff / #b45309 →  5.02:1 ✓
     ms pill done          #166534 / #dcfce7 →  6.49:1 ✓
     ms pill now           #3730a3 / #e0e7ff →  8.06:1 ✓
     ms pill pending       #475569 / #f1f5f9 →  6.92:1 ✓
     ms pill rejected      #991b1b / #fee2e2 →  6.80:1 ✓
     replaced pill         #ffffff / #475569 →  7.58:1 ✓
     gauge state partial   #4338ca / #ffffff →  7.90:1 ✓
     gauge state at-risk   #b45309 / #ffffff →  5.02:1 ✓
     gauge state overspent #b91c1c / #ffffff →  6.47:1 ✓
     gauge state consumed  #047857 / #ffffff →  5.47:1 ✓
     nudge / warn note     #92400e / #fef3c7 →  6.37:1 ✓
     error chip            #991b1b / #fee2e2 →  6.80:1 ✓
     link / linkout        #4338ca / #ffffff →  7.90:1 ✓
     phase seg (active)    #3730a3 / #e0e7ff →  8.06:1 ✓
     phase seg (idle)      #475569 / #f1f5f9 →  6.92:1 ✓
   ============================================================================= */

.lifecycle-view {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: auto;
    background: var(--color-bg, #f8fafc);
    padding: 22px 28px 40px;
    box-sizing: border-box;
}

/* ── Shared bits ───────────────────────────────────────────────────────── */

.lifecycle-view .lc-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-text, #0f172a);              /* 17.06:1 ✓ */
}

.lifecycle-view .lc-eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--color-text-soft, #475569);         /* 7.24:1 ✓ */
}

.lifecycle-view .lc-soft  { color: var(--color-text-soft, #475569); }
.lifecycle-view .lc-muted { color: var(--color-text-muted, #64748b); } /* white bg only */

.lifecycle-view .lc-card {
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    padding: 16px 20px 18px;
    margin: 0 0 16px;
}

.lifecycle-view .lc-card__title {
    margin: 0 0 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-soft, #475569);         /* 7.58:1 ✓ */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.lifecycle-view .lc-empty {
    padding: 14px 2px;
    font-size: 0.88rem;
    color: var(--color-text-soft, #475569);         /* 7.58:1 ✓ */
}

.lifecycle-view .lc-bigempty {
    margin: 60px auto;
    max-width: 460px;
    text-align: center;
    color: var(--color-text-soft, #475569);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Buttons — house .btn look, scoped (index.html owns the global tokens) */
.lifecycle-view .lc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--color-border-strong, #cbd5e1);
    border-radius: var(--radius-sm, 6px);
    background: var(--color-surface, #ffffff);
    color: var(--color-text, #0f172a);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.lifecycle-view .lc-btn:hover { background: var(--color-surface-2, #f1f5f9); }
.lifecycle-view .lc-btn:focus-visible,
.lifecycle-view .lc-linkout:focus-visible,
.lifecycle-view .lc-input:focus-visible,
.lifecycle-view .lc-select:focus-visible {
    outline: 2px solid var(--color-primary-dark, #4338ca);
    outline-offset: 1px;
}

/* Link-out (tracker complement, drawer) — link-styled button */
.lifecycle-view .lc-linkout {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary-dark, #4338ca);       /* 7.90:1 ✓ */
    cursor: pointer;
    text-decoration: none;
}
.lifecycle-view .lc-linkout:hover { text-decoration: underline; }

/* ── Picker ────────────────────────────────────────────────────────────── */

.lifecycle-view .lc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.lifecycle-view .lc-field { display: flex; flex-direction: column; gap: 4px; }

.lifecycle-view .lc-field__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-soft, #475569);          /* 7.24:1 ✓ */
}

.lifecycle-view .lc-input,
.lifecycle-view .lc-select {
    padding: 7px 10px;
    border: 1px solid var(--color-border-strong, #cbd5e1);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--color-text, #0f172a);
    background: var(--color-surface, #ffffff);
    box-sizing: border-box;
}
.lifecycle-view .lc-input { min-width: 240px; }

.lifecycle-view .lc-toolbar__count {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-soft, #475569);          /* 7.24:1 ✓ */
    padding-bottom: 8px;
}

.lifecycle-view .lc-caselist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lifecycle-view .lc-caserow {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text, #0f172a);               /* 17.85:1 ✓ */
    cursor: pointer;
}
.lifecycle-view .lc-caserow:hover {
    border-color: var(--color-primary-dark, #4338ca);
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(15, 23, 42, 0.06));
}
.lifecycle-view .lc-caserow:focus-visible {
    outline: 2px solid var(--color-primary-dark, #4338ca);
    outline-offset: 1px;
}

.lifecycle-view .lc-caserow__label {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lifecycle-view .lc-caserow__meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--color-text-soft, #475569);          /* 7.58:1 ✓ */
}

/* ── Pills / chips ─────────────────────────────────────────────────────── */

/* Colored pills: background set inline from an AA-dark hex; text is always
   white (charter rule 8) — the view asserts via UIContrast per render. */
.lifecycle-view .lc-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Tinted status pill (dark text on light tint — canonical badge pairs) */
.lifecycle-view .lc-tint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}
.lifecycle-view .lc-tint--done     { background: #dcfce7; color: #166534; } /* 6.49:1 ✓ */
.lifecycle-view .lc-tint--now      { background: #e0e7ff; color: #3730a3; } /* 8.06:1 ✓ */
.lifecycle-view .lc-tint--pending  { background: #f1f5f9; color: #475569; } /* 6.92:1 ✓ */
.lifecycle-view .lc-tint--rejected { background: #fee2e2; color: #991b1b; } /* 6.80:1 ✓ */

/* ── Case header ───────────────────────────────────────────────────────── */

.lifecycle-view .lc-case-header { margin-bottom: 16px; }

.lifecycle-view .lc-case-header__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.lifecycle-view .lc-case-header__actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lifecycle-view .lc-case-header__id {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lifecycle-view .lc-case-header__sub {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--color-text-soft, #475569);          /* 7.24:1 ✓ */
}

/* OP → DP phase indicator (label + weight — never colour-only) */
.lifecycle-view .lc-phase {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}
.lifecycle-view .lc-phase__seg {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;                                   /* 6.92:1 ✓ */
}
.lifecycle-view .lc-phase__seg--active {
    background: #e0e7ff;
    color: #3730a3;                                   /* 8.06:1 ✓ */
}
.lifecycle-view .lc-phase__arrow { color: var(--color-text-muted, #64748b); font-size: 0.75rem; }

/* ── Attention (signals) ───────────────────────────────────────────────── */

.lifecycle-view .lc-attention {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.lifecycle-view .lc-signal {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;                     /* on #b91c1c 6.47:1 / #b45309 5.02:1 ✓ */
}
.lifecycle-view .lc-signal__tag {
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
}

.lifecycle-view .lc-allclear {
    font-size: 0.8rem;
    color: var(--color-text-soft, #475569);          /* 7.24:1 ✓ */
    margin-bottom: 16px;
}

/* ── Two-column case grid ──────────────────────────────────────────────── */

.lifecycle-view .lc-grid {
    display: grid;
    grid-template-columns: minmax(360px, 11fr) minmax(320px, 9fr);
    gap: 0 20px;
    align-items: start;
}

@media (max-width: 1180px) {
    .lifecycle-view .lc-grid { grid-template-columns: 1fr; }
}

/* ── Timeline ──────────────────────────────────────────────────────────── */

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

.lifecycle-view .lc-phase-head {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-soft, #475569);          /* 7.58:1 ✓ */
    margin: 4px 0 10px;
}
.lifecycle-view .lc-phase-head:not(:first-child) { margin-top: 18px; }

.lifecycle-view .lc-ms {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 0 4px 18px 4px;
    border-radius: var(--radius-sm, 6px);
}
.lifecycle-view .lc-ms:focus-visible {
    outline: 2px solid var(--color-primary-dark, #4338ca);
    outline-offset: 1px;
}

/* connector line */
.lifecycle-view .lc-ms::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 26px;
    bottom: -2px;
    width: 2px;
    background: var(--color-border, #e2e8f0);
}
.lifecycle-view .lc-ms:last-child::before { display: none; }

.lifecycle-view .lc-ms__node {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    margin-top: 1px;
}
.lifecycle-view .lc-ms__node--done     { background: #047857; color: #ffffff; } /* 5.48:1 ✓ */
.lifecycle-view .lc-ms__node--now      { background: #4338ca; color: #ffffff;   /* 7.90:1 ✓ */
                                         box-shadow: 0 0 0 4px #e0e7ff; }
.lifecycle-view .lc-ms__node--pending  { background: #ffffff; color: #475569;   /* 7.58:1 ✓ */
                                         border: 2px solid #64748b; box-sizing: border-box; }
.lifecycle-view .lc-ms__node--rejected { background: #b91c1c; color: #ffffff; } /* 6.47:1 ✓ */

.lifecycle-view .lc-ms__body { min-width: 0; flex: 1; }

.lifecycle-view .lc-ms__row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.lifecycle-view .lc-ms__text {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text, #0f172a);               /* 17.06:1 ✓ */
}
.lifecycle-view .lc-ms--pending .lc-ms__text { color: var(--color-text-soft, #475569); font-weight: 500; }

.lifecycle-view .lc-ms__date {
    font-size: 0.78rem;
    color: var(--color-text-soft, #475569);          /* 7.24:1 ✓ */
    font-variant-numeric: tabular-nums;
    margin-left: auto;
    white-space: nowrap;
}

.lifecycle-view .lc-ms__mission {
    font-size: 0.74rem;
    color: var(--color-text-soft, #475569);          /* 7.24:1 ✓ */
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Budget gauge ──────────────────────────────────────────────────────── */

.lifecycle-view .lc-gauge__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.lifecycle-view .lc-gauge__pct {
    font-size: 1.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.lifecycle-view .lc-gauge__amounts {
    font-size: 0.85rem;
    color: var(--color-text-soft, #475569);          /* 7.58:1 ✓ */
    font-variant-numeric: tabular-nums;
}

.lifecycle-view .lc-gauge__bar {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: var(--color-surface-2, #f1f5f9);
    border: 1px solid var(--color-border, #e2e8f0);
    margin: 10px 0 6px;
    overflow: visible;
}
.lifecycle-view .lc-gauge__fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    max-width: 100%;
}
.lifecycle-view .lc-gauge__marker {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: #92400e;
}
.lifecycle-view .lc-gauge__marker-label {
    font-size: 0.7rem;
    color: var(--color-text-soft, #475569);          /* 7.58:1 ✓ */
}

.lifecycle-view .lc-gauge__meta {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--color-text-soft, #475569);          /* 7.58:1 ✓ */
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-variant-numeric: tabular-nums;
}

.lifecycle-view .lc-nudge {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fef3c7;
    color: #92400e;                                   /* 6.37:1 ✓ */
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.45;
}

/* ── Missions ──────────────────────────────────────────────────────────── */

.lifecycle-view .lc-mission {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--color-surface, #ffffff);
}
.lifecycle-view .lc-mission--replaced { background: var(--color-bg, #f8fafc); }

.lifecycle-view .lc-mission__head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lifecycle-view .lc-mission__title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text, #0f172a);               /* 17.85:1 ✓ (17.06 on bg) */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.lifecycle-view .lc-mission__row {
    margin-top: 6px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--color-text-soft, #475569);          /* 7.58:1 ✓ */
}
.lifecycle-view .lc-mission__row-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-soft, #475569);
    min-width: 76px;
}

.lifecycle-view .lc-chipline { display: flex; flex-wrap: wrap; gap: 6px; }

/* Neutral data chip (SP, training) — clickable, opens the entity drawer */
.lifecycle-view .lc-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border: 1px solid var(--color-border-strong, #cbd5e1);
    border-radius: 999px;
    background: var(--color-surface, #ffffff);
    color: var(--color-text, #0f172a);               /* 17.85:1 ✓ */
    font-size: 0.76rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    max-width: 100%;
}
.lifecycle-view .lc-chip:hover { border-color: var(--color-primary-dark, #4338ca); }
.lifecycle-view .lc-chip:focus-visible {
    outline: 2px solid var(--color-primary-dark, #4338ca);
    outline-offset: 1px;
}
.lifecycle-view .lc-chip > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lifecycle-view .lc-missing-months {
    background: #fee2e2;
    color: #991b1b;                                   /* 6.80:1 ✓ */
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ── Documents ─────────────────────────────────────────────────────────── */

.lifecycle-view .lc-docscope { margin-bottom: 12px; }
.lifecycle-view .lc-docscope:last-child { margin-bottom: 0; }

.lifecycle-view .lc-docscope__head {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-soft, #475569);          /* 7.58:1 ✓ */
    margin-bottom: 6px;
}

.lifecycle-view .lc-doclist { list-style: none; margin: 0; padding: 0; }

.lifecycle-view .lc-doc { margin-bottom: 4px; }

.lifecycle-view .lc-doc__row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.lifecycle-view .lc-doc__icon { flex-shrink: 0; font-size: 0.9rem; }

.lifecycle-view .lc-doc__name {
    background: none;
    border: none;
    padding: 2px 0;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-primary-dark, #4338ca);       /* 7.90:1 ✓ */
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.lifecycle-view .lc-doc__name:hover { text-decoration: underline; }
.lifecycle-view .lc-doc__name:focus-visible {
    outline: 2px solid var(--color-primary-dark, #4338ca);
    outline-offset: 1px;
}

.lifecycle-view .lc-doc__size {
    flex-shrink: 0;
    font-size: 0.74rem;
    color: var(--color-text-soft, #475569);          /* 7.58:1 ✓ */
}

/* File-type pill — house .etag small-badge idiom (neutral tokens, AA). */
.lifecycle-view .lc-doc__typepill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 20px;
    height: 15px;
    padding: 0 5px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    border-radius: 4px;
    white-space: nowrap;
    text-transform: uppercase;
    background: var(--color-surface-2, #f1f5f9);
    color: var(--color-text, #0f172a);               /* 16.30:1 on #f1f5f9 ✓ */
    border: 1px solid var(--color-border, #e2e8f0);
}

.lifecycle-view .lc-doc__download {
    flex-shrink: 0;
    margin-left: auto;
    appearance: none;
    font: inherit;
    cursor: pointer;
    background: none;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--color-text-soft, #475569);          /* 7.58:1 ✓ */
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 4px;
}
.lifecycle-view .lc-doc__download:hover { background: var(--color-surface-2, #f1f5f9); }
.lifecycle-view .lc-doc__download:focus-visible {
    outline: 2px solid var(--color-primary-dark, #4338ca);
}

.lifecycle-view .lc-doc__open {
    flex-shrink: 0;
    text-decoration: none;
    color: var(--color-text-soft, #475569);          /* 7.58:1 ✓ */
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 4px;
}
.lifecycle-view .lc-doc__open:hover { background: var(--color-surface-2, #f1f5f9); }
.lifecycle-view .lc-doc__open:focus-visible {
    outline: 2px solid var(--color-primary-dark, #4338ca);
}

.lifecycle-view .lc-doc__preview { margin: 6px 0 10px 24px; }

.lifecycle-view .lc-preview-frame {
    width: 100%;
    height: 420px;
    border: 1px solid var(--color-border-strong, #cbd5e1);
    border-radius: var(--radius-sm, 6px);
    background: #ffffff;
}
.lifecycle-view .lc-preview-img {
    max-width: 100%;
    max-height: 420px;
    border: 1px solid var(--color-border-strong, #cbd5e1);
    border-radius: var(--radius-sm, 6px);
}
.lifecycle-view .lc-preview-text {
    max-height: 320px;
    overflow: auto;
    background: var(--color-surface-2, #f1f5f9);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: var(--radius-sm, 6px);
    padding: 10px 12px;
    font-size: 0.78rem;
    color: var(--color-text, #0f172a);               /* 16.30:1 on #f1f5f9 ✓ */
    white-space: pre-wrap;
    word-break: break-word;
}
.lifecycle-view .lc-preview-pending {
    font-size: 0.8rem;
    color: var(--color-text-soft, #475569);          /* 7.58:1 ✓ */
    margin: 4px 0;
}

.lifecycle-view .lc-errorchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #fee2e2;
    color: #991b1b;                                   /* 6.80:1 ✓ */
    font-size: 0.78rem;
    font-weight: 700;
}

/* Transient "not yet synced" chip — amber (hopeful), distinct from the
   red terminal lc-errorchip. */
.lifecycle-view .lc-notsynced {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #fef3c7;
    color: #92400e;                                   /* 6.37:1 ✓ (matches lc-nudge) */
    font-size: 0.78rem;
    font-weight: 700;
}
.lifecycle-view .lc-notsynced .lc-linkout { color: #92400e; }

/* ── Print (improvement #6): case reads as a clean one-column brief ────── */

@media print {
    .lifecycle-view { padding: 0; overflow: visible; }
    .lifecycle-view .lc-toolbar,
    .lifecycle-view .lc-case-header__actions,
    .lifecycle-view .lc-btn,
    .lifecycle-view .lc-linkout,
    .lifecycle-view .lc-doc__open,
    .lifecycle-view .lc-doc__download,
    .lifecycle-view .lc-doc__preview { display: none !important; }
    .lifecycle-view .lc-grid { grid-template-columns: 1fr; }
    .lifecycle-view .lc-card,
    .lifecycle-view .lc-mission { break-inside: avoid; border-color: #94a3b8; }
}
