﻿/* ── Dashboard Global Styles (Dark Theme) ─────────────────────────────── */
/* Designed for wall-mounted displays. Always dark. */

/* ── Report pages (ReportLayout) ────────────────────────────────────────── */
.report-root { background: #fff; min-height: 100vh; }
html:has(.report-root),
body:has(.report-root) { background: #fff !important; }
@media print { body, html { background: #fff !important; } }

/* ── Concept cards (dark dashboard) ─────────────────────────────────────── */
.please-concept-group { margin-bottom: 20px; }

.please-concept-group__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #60a5fa;
    margin-bottom: 8px;
    padding: 0 2px;
}

.please-concept-card {
    border: 1px solid rgba(96,165,250,0.25);
    border-left: 3px solid #3b82f6;
    border-radius: 0 6px 6px 0;
    margin-bottom: 10px;
    overflow: hidden;
}

.please-concept-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: rgba(96,165,250,0.07);
    border-bottom: 1px solid rgba(96,165,250,0.15);
    flex-wrap: wrap;
}

.please-concept-card__title {
    font-weight: 600;
    color: #e2e8f0;
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
}

.please-concept-card__date {
    font-size: 0.7rem;
    color: #475569;
    margin-left: auto;
    white-space: nowrap;
}

.please-concept-card__body {
    padding: 10px 12px;
    font-size: 0.84rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.please-concept-card__body--empty {
    font-style: italic;
    color: #475569;
}

/* blue indicator dot variant for open concepts */
.please-sidebar-item__warn-dot--blue { background: #3b82f6; }

/* ── Mermaid diagrams ────────────────────────────────────────────────────── */
.mermaid-rendered { margin: 1rem 0; text-align: center; }
.mermaid-rendered svg { max-width: 100%; height: auto; }
/* Contained fallback for an unrenderable diagram — must look tidy on the white report and in-app */
.mermaid-error { display: block; margin: 1rem 0; padding: 10px 14px; border: 1px solid rgba(180,83,9,0.4); border-radius: 8px; background: rgba(180,83,9,0.06); text-align: left; font-family: inherit; font-size: 0.85rem; }
.mermaid-error__note { font-weight: 600; color: #b45309; }
.mermaid-error__reason { margin-top: 2px; font-size: 0.78rem; color: #92744a; }
.mermaid-error__src { margin-top: 6px; }
.mermaid-error__src summary { cursor: pointer; color: #8a6d3b; font-size: 0.8rem; user-select: none; }
.mermaid-error__src pre { margin: 6px 0 0; padding: 8px 10px; background: rgba(0,0,0,0.05); border-radius: 6px; overflow-x: auto; font-size: 0.78rem; white-space: pre-wrap; word-break: break-word; }
.rpt-section__legend { font-size: 0.8rem; color: #666; margin-top: 0.5rem; }

:root {
    --bg-dashboard:   #1E2A35;
    --color-pass:     #4CAF50;
    --color-fail:     #B0171E;
    --color-running:  #2196F3;
    --color-idle:     #546E7A;
    --color-warning:  #FF9800;
    --brand-red:      #B0171E;
    --brand-red-dark: #8C1118;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-dashboard);
    color: #E0E4EA;
    -webkit-font-smoothing: antialiased;
}

*, *::before, *::after {
    box-sizing: border-box;
}

select {
    background-color: #1E2A35;
    color: #E0E4EA;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2390A4AE' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    padding-right: 2rem;
}

select:focus {
    outline: none;
    border-color: rgba(255,255,255,0.4);
}

select option {
    background-color: #1E2A35;
    color: #E0E4EA;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.28);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.45);
    background-clip: padding-box;
}

/* Firefox */
html { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.32) transparent; }

/* Light mode: dark thumb on light surfaces */
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.28); background-clip: padding-box; }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.45); background-clip: padding-box; }
html[data-theme="light"] { scrollbar-color: rgba(0,0,0,0.32) transparent; }

#blazor-error-ui {
    background: #B0171E;
    color: white;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    right: 0;
    text-align: center;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   PLEASE — Design System
   Palette:
     surface-0 #141d26  surface-1 #1b2736  surface-2 #243347
     border    #2c3e50  border-hi #3d5166
     text-pri  #e2e8f0  text-sec  #8fa8be  text-muted #506070
     accent    #38bdf8  pass #34d399  warn #fbbf24  fail #f87171
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Page shell ─────────────────────────────────────────────────────── */
.please-page { max-width: 1400px; margin: 0 auto; padding: 28px 24px 48px; }

/* ── Page header (generic — used by non-project pages) ───────────────── */
.please-page__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid #2c3e50; }
.please-header-badges { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; flex-shrink: 0; }
.please-metric-badge { display: inline-flex; flex-direction: column; align-items: center; min-width: 80px; padding: 6px 14px; border-radius: 10px; border: 1px solid transparent; cursor: default; }
.please-metric-badge__label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; }
.please-metric-badge__value { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; }
.please-metric-badge--percent { background: hsl(var(--cov-hue,0),60%,18%); color: hsl(var(--cov-hue,0),70%,65%); border-color: hsl(var(--cov-hue,0),60%,35%); }
.please-metric-badge--high   { background: rgba(52,211,153,0.12); color: #34d399; border-color: rgba(52,211,153,0.3); }
.please-metric-badge--medium { background: rgba(251,191,36,0.12);  color: #fbbf24; border-color: rgba(251,191,36,0.3); }
.please-metric-badge--low    { background: rgba(248,113,113,0.12); color: #f87171; border-color: rgba(248,113,113,0.3); }
.please-page__header h1 { margin: 0 0 4px; font-size: 1.65rem; font-weight: 700; color: #e2e8f0; letter-spacing: -0.01em; }
.please-page__subtitle { margin: 0; color: #8fa8be; font-size: 0.875rem; }

/* ── Project detail header ────────────────────────────────────────────── */
.please-project-header { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid #2c3e50; }
.please-project-header__title { margin: 4px 0 6px; font-size: 1.9rem; font-weight: 700; color: #e2e8f0; letter-spacing: -0.02em; line-height: 1.2; }
.please-project-header__sub { margin: 0 0 10px; font-size: 0.95rem; color: #8fa8be; font-weight: 500; }
.please-project-header__chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.please-project-header__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.please-nav-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 16px; border-radius: 8px; font-size: 0.855rem; font-weight: 600; text-decoration: none; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.4); transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s; white-space: nowrap; }
.please-nav-btn:hover { opacity: 0.88; transform: translateY(-1px); color: #fff; }
.please-nav-btn--reports    { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); }
.please-nav-btn--milestones { background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%); }
.please-nav-btn--repo       { background: linear-gradient(135deg, #064e3b 0%, #0f766e 100%); }
.please-nav-btn--audit      { background: linear-gradient(135deg, #78350f 0%, #b45309 100%); }

/* ── Project metrics strip ────────────────────────────────────────────── */
.please-project-header__metrics { display: flex; flex-wrap: wrap; border: 1px solid #2c3e50; border-radius: 8px; overflow: hidden; margin-top: 16px; }
.please-project-metric { flex: 1; min-width: 80px; display: flex; flex-direction: column; align-items: center; padding: 12px 10px; border-right: 1px solid #2c3e50; background: #141d26; }
.please-project-metric:last-child { border-right: none; }
.please-project-metric__value { font-size: 1.35rem; font-weight: 800; color: #e2e8f0; letter-spacing: -0.01em; }
.please-project-metric__label { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #8fa8be; margin-top: 3px; }
.please-project-metric--pct { background: hsl(var(--cov-hue,0),55%,13%); }
.please-project-metric--pct .please-project-metric__value { color: hsl(var(--cov-hue,0),70%,65%); }
.please-project-metric--pct .please-project-metric__label { color: hsl(var(--cov-hue,0),40%,52%); }
.please-project-metric--warn { background: rgba(251,191,36,0.07); }
.please-project-metric--warn .please-project-metric__value { color: #fbbf24; }
.please-project-metric--error { background: rgba(248,113,113,0.07); }
.please-project-metric--error .please-project-metric__value { color: #f87171; }
.please-home-title-row { display: flex; align-items: center; gap: 18px; }
.please-home-logo { height: 72px; width: 72px; object-fit: contain; border-radius: 12px; background: #fff; padding: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.35); flex-shrink: 0; }
.please-back { display: inline-flex; align-items: center; gap: 4px; color: #8fa8be; text-decoration: none; font-size: 0.825rem; margin-bottom: 8px; transition: color 0.12s; }
.please-back:hover { color: #38bdf8; }

.please-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.8rem; margin-bottom: 8px; }
.please-breadcrumb__sep { color: #506070; }
.please-breadcrumb__current { color: #c8d9e6; font-weight: 600; }
/* beat `.please-page a` (0,1,1) for the muted link colour */
.please-page a.please-breadcrumb__link,
.please-page a.please-breadcrumb__link:visited { color: #8fa8be; text-decoration: none; transition: color 0.12s; }
.please-page a.please-breadcrumb__link:hover { color: #38bdf8; }
html[data-theme="light"] .please-page a.please-breadcrumb__link,
html[data-theme="light"] .please-page a.please-breadcrumb__link:visited { color: #64748b; }
html[data-theme="light"] .please-page a.please-breadcrumb__link:hover { color: #2563eb; }
html[data-theme="light"] .please-breadcrumb__sep { color: #94a3b8; }
html[data-theme="light"] .please-breadcrumb__current { color: #1a2535; }
.please-user-link { color: #7dd3fc; text-decoration: none; border-bottom: 1px dotted rgba(125,211,252,0.4); transition: color 0.12s, border-color 0.12s; }
.please-user-link:hover { color: #38bdf8; border-bottom-color: #38bdf8; }

/* ── States ──────────────────────────────────────────────────────────── */
.please-loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: #8fa8be; padding: 60px 0; font-size: 0.9rem; }
.please-loading::before { content: ''; width: 18px; height: 18px; border: 2px solid #2c3e50; border-top-color: #38bdf8; border-radius: 50%; animation: please-spin 0.8s linear infinite; }
@keyframes please-spin { to { transform: rotate(360deg); } }
.please-empty { color: #506070; padding: 48px 0; text-align: center; font-size: 0.9rem; }
.please-error { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.3); color: #f87171; padding: 14px 18px; border-radius: 8px; font-size: 0.9rem; margin: 16px 0; }

/* ── Section ─────────────────────────────────────────────────────────── */
.please-section { margin-bottom: 28px; }
.please-section h2 { font-size: 0.78rem; font-weight: 700; color: #8fa8be; text-transform: uppercase; letter-spacing: 0.07em; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid #2c3e50; }
.please-section-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.please-section-row h2 { margin: 0; border: none; padding: 0; }

/* ── Reusable collapse/expand chevron ────────────────────────────────────
   CSS-drawn caret (two borders): points right when closed, rotates down when
   open. Matches the Status & gates tree. Add .please-chevron--open (state-
   driven toggles) — native <details> can instead drive it via the [open] rule
   below. Inherits currentColor, so it tints to its surrounding text. */
.please-chevron { display: inline-block; flex: none; width: 8px; height: 8px;
    border: solid currentColor; border-width: 0 2.2px 2.2px 0; opacity: 0.6;
    transform: rotate(-45deg); transition: transform 0.15s ease; position: relative; top: -2px; }
.please-chevron--open { transform: rotate(45deg); top: -1px; }
details[open] > summary > .please-chevron { transform: rotate(45deg); top: -1px; }
/* native <details> summaries opting into the chevron: hide the default marker */
.please-diff-summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; color: #8fa8be; list-style: none; }
.please-diff-summary::-webkit-details-marker { display: none; }

/* ── Recent changes digest (per-day, lazy) ───────────────────────────── */
.please-changes__toggle { display: flex; align-items: center; gap: 8px; background: none; border: none; padding: 0; cursor: pointer; width: 100%; text-align: left; }
.please-changes__toggle h2 { margin: 0; border: none; padding: 0; }
.please-changes__days { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.please-changes__day { border: 1px solid #2c3e50; border-radius: 8px; overflow: hidden; }
.please-changes__day-hdr { display: flex; align-items: center; gap: 10px; width: 100%; background: #1b2736; border: none; padding: 8px 12px; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.please-changes__day-hdr:hover { background: rgba(99,130,167,0.10); }
.please-changes__date { font-weight: 600; font-variant-numeric: tabular-nums; color: #cbd5e1; }
.please-changes__table { margin: 0; }
.please-changes__more { display: inline-block; margin: 8px 12px 10px; font-size: 0.82rem; color: #6382a3; }
.please-changes__more:hover { color: #93c5fd; }
html[data-theme="light"] .please-changes__day { border-color: #d6e0ea; }
html[data-theme="light"] .please-changes__day-hdr { background: #f1f5f9; }
html[data-theme="light"] .please-changes__date { color: #334155; }

/* ── Project cards ───────────────────────────────────────────────────── */
.please-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.please-project-card { background: #1b2736; border: 1px solid #2c3e50; border-left: 4px solid #38bdf8; border-radius: 10px; padding: 18px 20px; text-decoration: none; color: inherit; display: block; box-shadow: 0 2px 8px rgba(0,0,0,0.25); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.please-project-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); border-left-color: #7dd3fc; }
.please-project-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.please-project-card__code { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #38bdf8; background: rgba(56,189,248,0.1); padding: 2px 8px; border-radius: 4px; }
.please-project-card__title { font-size: 1.05rem; font-weight: 600; color: #e2e8f0; margin-bottom: 10px; line-height: 1.4; }
.please-project-card__meta { font-size: 0.78rem; color: #8fa8be; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── Pill badge (coverage / completion) ─────────────────────────────── */
.coverage-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 4px 12px; border-radius: 20px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em; cursor: default; background: hsl(var(--cov-hue,0),60%,18%); color: hsl(var(--cov-hue,0),70%,65%); border: 1px solid hsl(var(--cov-hue,0),60%,35%); }
html[data-theme="light"] .coverage-badge { background: hsl(var(--cov-hue,0),65%,93%); color: hsl(var(--cov-hue,0),60%,28%); border-color: hsl(var(--cov-hue,0),50%,72%); }

/* ── Coverage stats ──────────────────────────────────────────────────── */
.please-coverage-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.please-stat { padding: 7px 18px; border-radius: 8px; font-size: 0.83rem; font-weight: 700; letter-spacing: 0.02em; border: 1px solid transparent; transition: filter 0.12s; }
.please-stat--pass { background: rgba(52,211,153,0.1); color: #34d399; border-color: rgba(52,211,153,0.25); }
.please-stat--warn { background: rgba(251,191,36,0.1); color: #fbbf24; border-color: rgba(251,191,36,0.25); }
.please-stat--fail { background: rgba(248,113,113,0.1); color: #f87171; border-color: rgba(248,113,113,0.25); }
.please-stat--idle { background: rgba(100,116,139,0.1); color: #94a3b8; border-color: rgba(100,116,139,0.25); }
a.please-stat { text-decoration: none; cursor: pointer; }
a.please-stat:hover { filter: brightness(1.15); }

/* ── Badges ──────────────────────────────────────────────────────────── */
.please-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.please-badge--ip     { background: rgba(251,191,36,0.12);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.please-badge--notice { background: rgba(251,146,60,0.15);  color: #fb923c; border: 1px solid rgba(251,146,60,0.35); }
.please-badge--fail { background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
.please-badge--warn { background: rgba(251,191,36,0.12);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.please-badge--pass { background: rgba(52,211,153,0.12);  color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.please-badge--idle { background: rgba(100,116,139,0.12); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.please-badge--info { background: rgba(56,189,248,0.12);  color: #38bdf8; border: 1px solid rgba(56,189,248,0.3); }
.please-badge--discipline { background: rgba(45,212,191,0.12); color: #2dd4bf; border: 1px solid rgba(45,212,191,0.32); text-transform: capitalize; }
.please-badge--discipline-default { background: rgba(148,163,184,0.10); color: #94a3b8; border: 1px dashed rgba(148,163,184,0.4); }
.please-badge--rigor { background: rgba(168,85,247,0.12); color: #c084fc; border: 1px solid rgba(168,85,247,0.32); text-transform: capitalize; }
html[data-theme="light"] .please-badge--rigor { background: rgba(147,51,234,0.08); color: #7e22ce; border-color: rgba(147,51,234,0.25); }

/* Collapsible status groups + expandable item rows (PleaseOpenItems) */
.please-group { margin-bottom: 10px; }
.please-group__header { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 8px 14px; color: inherit; font-size: 0.9rem; }
.please-group__header:hover { background: rgba(255,255,255,0.06); }
.please-group__count { margin-left: auto; font-variant-numeric: tabular-nums; opacity: 0.7; font-weight: 600; }
.please-table-wrap + .please-group, .please-group .please-table-wrap { margin-top: 8px; }
.please-row--clickable { cursor: pointer; }
.please-row--clickable:hover { background: rgba(255,255,255,0.04); }
.please-row--detail > td { background: rgba(255,255,255,0.02); }
.please-item-detail { padding: 6px 8px 12px; }
.please-item-detail__desc { font-size: 0.9rem; line-height: 1.6; margin: 0 0 10px; }
.please-item-detail__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.82rem; opacity: 0.85; }
.please-item-detail__meta strong { opacity: 0.7; font-weight: 600; margin-right: 4px; }
html[data-theme="light"] .please-group__header { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.1); }
html[data-theme="light"] .please-group__header:hover { background: rgba(0,0,0,0.05); }
html[data-theme="light"] .please-row--clickable:hover { background: rgba(0,0,0,0.03); }
html[data-theme="light"] .please-row--detail > td { background: rgba(0,0,0,0.02); }

/* ── Milestone gate tree (15-MILESTONE_GATES.md) — read-only, theme-aware ──── */
.please-gate-tree { display: flex; flex-direction: column; gap: 8px; }
.please-gate-node { border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; background: rgba(255,255,255,0.03); }
.please-gate-node__head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; cursor: pointer;
    list-style: none; color: inherit; font-size: 0.9rem; border-radius: 8px; }
.please-gate-node__head::-webkit-details-marker { display: none; }
/* modern chevron drawn from two borders — points right (closed) → down (open) */
.please-gate-node__head::before { content: ""; display: inline-block; flex: none; width: 8px; height: 8px;
    border: solid currentColor; border-width: 0 2.2px 2.2px 0; opacity: 0.6;
    transform: rotate(-45deg); transition: transform 0.15s ease; position: relative; top: -2px; }
.please-gate-node[open] > summary.please-gate-node__head::before { transform: rotate(45deg); top: -1px; }
.please-gate-node__head--flat { cursor: default; }
.please-gate-node__head--flat::before { opacity: 0; }   /* keep title alignment, no caret on markers */
.please-gate-node__head:hover { background: rgba(255,255,255,0.05); }
.please-gate-node__head--flat:hover { background: transparent; }
.please-gate-node__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.please-gate-node__right { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.please-gate-node__counts { font-variant-numeric: tabular-nums; opacity: 0.8; font-size: 0.82rem; }
.please-gate-node__body { padding: 2px 14px 12px 30px; display: flex; flex-direction: column; gap: 3px; }
.please-gate-crit__head, .please-gate-crit--leaf { display: flex; align-items: center; gap: 8px; padding: 3px 0;
    list-style: none; font-size: 0.86rem; }
.please-gate-crit__head { cursor: pointer; }
.please-gate-crit__head::-webkit-details-marker { display: none; }
.please-gate-crit__head::before { content: ""; display: inline-block; flex: none; width: 7px; height: 7px;
    border: solid currentColor; border-width: 0 2px 2px 0; opacity: 0.5;
    transform: rotate(-45deg); transition: transform 0.15s ease; position: relative; top: -2px; }
.please-gate-crit[open] > summary.please-gate-crit__head::before { transform: rotate(45deg); top: -1px; }
.please-gate-crit--leaf::before { content: ""; display: inline-block; flex: none; width: 4px; height: 4px;
    border-radius: 50%; background: currentColor; opacity: 0.3; }

/* Release is the terminal gate — set it apart at the bottom of the chronology */
.please-gate-node--release { margin-top: 10px; border-color: rgba(255,255,255,0.2); }
.please-gate-node--release::before { content: ""; display: block; width: 2px; height: 12px;
    margin: -10px auto 2px; background: rgba(255,255,255,0.15); }
html[data-theme="light"] .please-gate-node--release { border-color: rgba(0,0,0,0.2); }
html[data-theme="light"] .please-gate-node--release::before { background: rgba(0,0,0,0.15); }
.please-gate-evidence { margin: 1px 0 6px 26px; padding-left: 14px; list-style: disc; font-size: 0.82rem; opacity: 0.8; }
.please-gate-evidence li { padding: 1px 0; }
html[data-theme="light"] .please-gate-node { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.1); }
html[data-theme="light"] .please-gate-node__head:hover { background: rgba(0,0,0,0.04); }
html[data-theme="light"] .please-gate-node__head--flat:hover { background: transparent; }

/* ── Milestone timeline strip (colored gate tiles, horizontal) ───────────── */
.please-mstrip-section { margin-bottom: 14px; }
.please-mstrip { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 2px 0 8px; }
.please-mstrip__tile { flex: 0 0 auto; min-width: 124px; max-width: 220px; display: flex; flex-direction: column; gap: 3px;
    padding: 9px 11px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); cursor: default; }
.please-mstrip__state { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; }
.please-mstrip__title { font-size: 0.82rem; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.please-mstrip__meta { font-size: 0.68rem; color: #8fa8be; display: flex; gap: 4px; flex-wrap: wrap; }
.please-mstrip__counts { color: #64748b; }
.please-mstrip__tile--pass { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.32); }
.please-mstrip__tile--pass .please-mstrip__state { color: #34d399; }
.please-mstrip__tile--warn { background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.32); }
.please-mstrip__tile--warn .please-mstrip__state { color: #fbbf24; }
.please-mstrip__tile--fail { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.32); }
.please-mstrip__tile--fail .please-mstrip__state { color: #f87171; }
.please-mstrip__tile--idle { background: rgba(100,116,139,0.10); border-color: rgba(100,116,139,0.28); }
.please-mstrip__tile--idle .please-mstrip__state { color: #94a3b8; }
.please-mstrip__tile--release { border-width: 2px; }
html[data-theme="light"] .please-mstrip__title { color: #1a2535; }
html[data-theme="light"] .please-mstrip__tile { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.1); }
html[data-theme="light"] .please-mstrip__tile--pass { background: rgba(22,163,74,0.08); border-color: rgba(22,163,74,0.28); }
html[data-theme="light"] .please-mstrip__tile--pass .please-mstrip__state { color: #15803d; }
html[data-theme="light"] .please-mstrip__tile--warn { background: rgba(180,83,9,0.08); border-color: rgba(180,83,9,0.28); }
html[data-theme="light"] .please-mstrip__tile--warn .please-mstrip__state { color: #b45309; }
html[data-theme="light"] .please-mstrip__tile--fail { background: rgba(185,28,28,0.08); border-color: rgba(185,28,28,0.28); }
html[data-theme="light"] .please-mstrip__tile--fail .please-mstrip__state { color: #b91c1c; }
html[data-theme="light"] .please-mstrip__tile--idle { background: rgba(71,85,105,0.08); border-color: rgba(71,85,105,0.24); }
html[data-theme="light"] .please-mstrip__tile--idle .please-mstrip__state { color: #475569; }

/* ── Table toolbar + filter ──────────────────────────────────────────── */
.please-table-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.please-table-toolbar--wrap { flex-wrap: wrap; }
.please-project-filter { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.please-project-filter__input { width: 260px; }
.please-filter-clear { padding: 5px 10px; background: transparent; border: 1px solid #2c3e50; border-radius: 5px; color: #64748b; font-size: 0.78rem; cursor: pointer; transition: all 0.12s; }
.please-filter-clear:hover { border-color: #38bdf8; color: #e2e8f0; }
.please-filter-input { flex: 1; max-width: 340px; background: #1b2736; border: 1px solid #2c3e50; border-radius: 6px; color: #e2e8f0; padding: 7px 12px; font-size: 0.85rem; outline: none; transition: border-color 0.15s; }
.please-filter-input::placeholder { color: #506070; }
.please-filter-input:focus { border-color: #38bdf8; }
.please-filter-count { font-size: 0.78rem; color: #506070; white-space: nowrap; }

/* ── Table ───────────────────────────────────────────────────────────── */
.please-table-wrap { overflow-x: auto; border: 1px solid #2c3e50; border-radius: 8px; background: #1b2736; }
.please-table-wrap--scroll { max-height: 58rem; overflow-y: auto; }
.please-table { width: 100%; border-collapse: collapse; font-size: 0.855rem; min-width: 540px; }
.please-table th { text-align: left; padding: 9px 14px; color: #8fa8be; background: #141d26; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; border-bottom: 1px solid #2c3e50; position: sticky; top: 0; z-index: 1; }
.please-table td { padding: 9px 14px; border-bottom: 1px solid #1e2d3d; color: #c8d9e6; vertical-align: top; }
.please-table td.please-td--title { min-width: 260px; max-width: 480px; word-break: break-word; white-space: normal; line-height: 1.45; }
.please-table td.please-td--code { white-space: nowrap; }
.please-table td.please-td--narrow { white-space: nowrap; width: 1%; }
.please-table td.please-td--refdes { max-width: 180px; word-break: break-word; white-space: normal; line-height: 1.45; }
.please-table td.please-td--muted, .please-td--muted { color: #506070; }
.please-table tbody tr:last-child td { border-bottom: none; }
.please-table tbody tr:hover td { background: #243347; }
.please-tr--nomount { opacity: 0.4; }
.please-table code { font-size: 0.8rem; color: #7dd3fc; background: rgba(125,211,252,0.08); padding: 1px 5px; border-radius: 3px; }

/* ── Tab strip ───────────────────────────────────────────────────────── */
.please-tabs { display: flex; gap: 2px; margin-bottom: 18px; border-bottom: 1px solid #2c3e50; overflow-x: auto; scrollbar-width: none; }
.please-tabs::-webkit-scrollbar { display: none; }
.please-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 9px 18px; color: #8fa8be; font-size: 0.85rem; font-weight: 600; cursor: pointer; margin-bottom: -1px; white-space: nowrap; transition: color 0.12s; }
.please-tab:hover { color: #e2e8f0; }
.please-tab--active { color: #38bdf8; border-bottom-color: #38bdf8; }
.please-tab--warn { color: #fbbf24; }
.please-tab--warn.please-tab--active { color: #fbbf24; border-bottom-color: #fbbf24; }

/* ── Misc ────────────────────────────────────────────────────────────── */
.please-artifact-text { color: #c8d9e6; font-size: 0.9rem; line-height: 1.7; white-space: pre-wrap; }
.please-assist-btn { background: #1b2736; border: 1px solid #2c3e50; color: #8fa8be; padding: 8px 14px; border-radius: 6px; font-size: 0.82rem; cursor: pointer; white-space: nowrap; align-self: flex-start; transition: border-color 0.12s, color 0.12s; }
.please-assist-btn:hover { border-color: #38bdf8; color: #38bdf8; }
.please-link-btn { font-size: 0.8rem; color: #8fa8be; text-decoration: none; border: 1px solid #2c3e50; padding: 5px 12px; border-radius: 6px; transition: border-color 0.12s, color 0.12s; white-space: nowrap; background: none; cursor: pointer; }
.please-link-btn:hover { color: #38bdf8; border-color: #38bdf8; }
.please-link-btn--active { color: #38bdf8; border-color: #38bdf8; background: rgba(56,189,248,0.07); }

/* ── Nudge bar ───────────────────────────────────────────────────────── */
.please-nudge { padding: 12px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 0.875rem; line-height: 1.6; }
.please-nudge--warn { background: rgba(251,191,36,0.07); border: 1px solid rgba(251,191,36,0.35); color: #fcd34d; }
.please-nudge-link { color: #7dd3fc; text-decoration: underline; }
.please-nudge code { background: rgba(255,255,255,0.07); padding: 1px 6px; border-radius: 3px; font-size: 0.84em; }

/* Model guide — "how this fits together" collapsible explainer (dark defaults; light overrides below) */
.please-model-guide { margin: 16px 0 4px; }
.please-model-guide__toggle {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 8px 14px; border-radius: 8px; font-size: 0.875rem; font-weight: 500;
    background: rgba(125,211,252,0.08); border: 1px solid rgba(125,211,252,0.3); color: #7dd3fc;
}
.please-model-guide__toggle:hover { background: rgba(125,211,252,0.14); }
.please-model-guide__body {
    margin-top: 12px; padding: 18px 20px; border-radius: 10px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
}
.please-model-guide__intro { font-size: 0.9rem; line-height: 1.6; margin: 0 0 16px; opacity: 0.92; }
.please-model-guide__intro code { background: rgba(255,255,255,0.07); padding: 1px 6px; border-radius: 3px; font-size: 0.84em; }
.please-model-guide__legend { margin-top: 18px; }
.please-model-guide__legend h4 { margin: 0 0 10px; font-size: 0.95rem; }
.please-model-guide__legend dl { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0; font-size: 0.86rem; line-height: 1.5; }
.please-model-guide__legend dt { font-weight: 600; color: #7dd3fc; white-space: nowrap; }
.please-model-guide__legend dd { margin: 0; opacity: 0.9; }
.please-model-guide__legend code { background: rgba(255,255,255,0.07); padding: 1px 6px; border-radius: 3px; font-size: 0.84em; }
@media (max-width: 640px) { .please-model-guide__legend dl { grid-template-columns: 1fr; gap: 2px 0; } .please-model-guide__legend dt { margin-top: 8px; } }

html[data-theme="light"] .please-model-guide__toggle { background: rgba(37,99,235,0.06); border-color: rgba(37,99,235,0.3); color: #2563eb; }
html[data-theme="light"] .please-model-guide__toggle:hover { background: rgba(37,99,235,0.12); }
html[data-theme="light"] .please-model-guide__body { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.1); }
html[data-theme="light"] .please-model-guide__legend dt { color: #2563eb; }
html[data-theme="light"] .please-model-guide__intro code,
html[data-theme="light"] .please-model-guide__legend code { background: rgba(0,0,0,0.06); }

/* Only our own card div is themed in CSS; the Mermaid SVG palette itself is theme-aware via
   RE-RENDER — PleaseModelGuide rebuilds the diagram with a dark/light palette when the theme
   toggles. (Mermaid emits classDef styles as ID-scoped !important rules, which external CSS can't
   override, so CSS-only theming of the nodes/clusters/edges is not possible.) */
.please-model-guide__diagram { border: 1px solid; border-radius: 8px; padding: 14px; overflow-x: auto; }
.please-model-guide__diagram .mermaid-rendered { margin: 0; }
.please-model-guide__diagram svg { max-width: 100%; height: auto; }
.please-model-guide__diagram .node { cursor: pointer; }
.please-model-guide__diagram .node:hover { opacity: 0.85; }
.please-model-guide__diagram { background: #0e1722; border-color: rgba(255,255,255,0.10); }
html[data-theme="light"] .please-model-guide__diagram { background: #ffffff; border-color: rgba(0,0,0,0.12); }

/* Mermaid hover tooltip (appended to <body>, outside the diagram) — theme it too. */
div.mermaidTooltip { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; border-radius: 6px; padding: 4px 9px; font-size: 0.8rem; box-shadow: 0 4px 14px rgba(0,0,0,0.4); }
html[data-theme="light"] div.mermaidTooltip { background: #ffffff; color: #1f2937; border-color: #cbd5e1; box-shadow: 0 4px 14px rgba(0,0,0,0.15); }

/* inline colour-key chips used in the guide intro */
.please-mg-key { display: inline-block; padding: 0 7px; border-radius: 4px; font-size: 0.82em; font-weight: 600; color: #1f2937; }
.please-mg-key--present { background: #dcfce7; border: 1px solid #16a34a; }
.please-mg-key--empty { background: #f1f5f9; border: 1px dashed #94a3b8; }

/* ── Engineering Memory ──────────────────────────────────────────────── */
.please-memory { display: flex; flex-direction: column; gap: 12px; }
.please-memory__item { background: #141d26; border: 1px solid #2c3e50; border-left: 3px solid #38bdf8; border-radius: 8px; padding: 14px 18px; }
.please-memory__item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.please-memory__kind { font-size: 0.75rem; color: #8fa8be; text-transform: uppercase; letter-spacing: 0.05em; }
.please-memory__date { font-size: 0.75rem; color: #506070; margin-left: auto; }
.please-memory__statement { margin: 0; color: #c8d9e6; font-size: 0.9rem; line-height: 1.65; }

/* ── Component library ───────────────────────────────────────────────── */
.comp-lib-filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.comp-lib-search { flex: 1 1 220px; background: #1b2736; border: 1px solid #2c3e50; color: #c8d9e6; padding: 8px 12px; border-radius: 6px; font-size: 0.875rem; min-width: 0; }
.comp-lib-search:focus { outline: none; border-color: #38bdf8; }
.comp-lib-status-filter { background: #1b2736; border: 1px solid #2c3e50; color: #c8d9e6; padding: 8px 12px; border-radius: 6px; font-size: 0.875rem; cursor: pointer; }
.comp-lib-pagination { display: flex; align-items: center; gap: 14px; margin-top: 16px; font-size: 0.85rem; color: #8fa8be; }
.please-btn { background: #1b2736; border: 1px solid #2c3e50; color: #8fa8be; padding: 8px 16px; border-radius: 6px; font-size: 0.855rem; cursor: pointer; transition: border-color 0.12s, color 0.12s; white-space: nowrap; }
.please-btn:hover:not([disabled]) { border-color: #38bdf8; color: #38bdf8; }
.please-btn[disabled] { opacity: 0.4; cursor: default; }
.comp-detail-status { font-size: 0.9rem; padding: 6px 14px; align-self: flex-start; }
.comp-detail-meta { border-collapse: collapse; font-size: 0.875rem; }
.comp-detail-meta th { text-align: left; padding: 6px 18px 6px 0; color: #8fa8be; font-weight: 600; white-space: nowrap; width: 130px; }
.comp-detail-meta td { padding: 6px 0; color: #c8d9e6; }
.comp-detail-eol { color: #fbbf24; }
.comp-specs-pre { background: #141d26; border: 1px solid #2c3e50; border-radius: 8px; padding: 16px 18px; color: #c8d9e6; font-size: 0.82rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; overflow-x: auto; margin: 0; }
.comp-copy-btn { font-size: 0.78rem; padding: 5px 12px; }
.comp-copy-confirm { font-size: 0.78rem; color: #4ade80; margin-left: 10px; }

/* ── Project event timeline ──────────────────────────────────────────── */
.please-timeline { display: flex; flex-direction: column; gap: 0; }
.please-timeline__item { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid #1b2736; }
.please-timeline__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.please-timeline__dot--pass { background: #4ade80; }
.please-timeline__dot--fail { background: #f87171; }
.please-timeline__dot--idle { background: #4b6882; }
.please-timeline__dot--warn { background: #fbbf24; }
.please-timeline__body { flex: 1; min-width: 0; }
.please-timeline__header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.please-timeline__action { font-size: 0.875rem; color: #c8d9e6; font-weight: 500; }
.please-timeline__meta { font-size: 0.78rem; color: #506070; }

/* ── Link colors in dark theme ───────────────────────────────────────── */
.please-page a { color: #7dd3fc; }
.please-page a:visited { color: #93c5fd; }
.please-page a:hover { color: #38bdf8; }
/* Navigation/interactive links keep their own visual design */
.please-page a.please-back,
.please-page a.please-back:visited { color: #8fa8be; }
.please-page a.please-back:hover { color: #38bdf8; }
.please-page a.please-link-btn,
.please-page a.please-link-btn:visited { color: #8fa8be; }
.please-page a.please-link-btn:hover { color: #38bdf8; }
.please-page a.please-project-card,
.please-page a.please-project-card:visited { color: inherit; text-decoration: none; }
/* Stat links keep their pass/warn/fail/idle colors */
.please-page a.please-stat--pass,
.please-page a.please-stat--pass:visited { color: #34d399; }
.please-page a.please-stat--warn,
.please-page a.please-stat--warn:visited { color: #fbbf24; }
.please-page a.please-stat--fail,
.please-page a.please-stat--fail:visited { color: #f87171; }
.please-page a.please-stat--idle,
.please-page a.please-stat--idle:visited { color: #94a3b8; }

/* ── Markdown body ───────────────────────────────────────────────────── */
.markdown-body { color: #c8d9e6; font-size: 0.9rem; line-height: 1.7; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { color: #e2e8f0; margin: 1.2em 0 0.5em; font-weight: 700; }
.markdown-body h1 { font-size: 1.4rem; }
.markdown-body h2 { font-size: 1.15rem; }
.markdown-body h3 { font-size: 1rem; }
.markdown-body p { margin: 0 0 0.85em; }
.markdown-body ul, .markdown-body ol { padding-left: 1.5em; margin: 0 0 0.85em; }
.markdown-body li { margin-bottom: 0.25em; }
.markdown-body code { background: #243347; color: #7dd3fc; padding: 1px 6px; border-radius: 4px; font-size: 0.85em; }
.markdown-body pre { background: #141d26; border: 1px solid #2c3e50; border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin: 0 0 1em; }
.markdown-body pre code { background: none; padding: 0; color: #c8d9e6; font-size: 0.82em; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 0.875rem; }
.markdown-body th { background: #141d26; color: #8fa8be; padding: 7px 12px; text-align: left; border-bottom: 1px solid #2c3e50; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.markdown-body td { padding: 7px 12px; border-bottom: 1px solid #1e2d3d; color: #c8d9e6; }
.markdown-body tbody tr:hover td { background: #243347; }
.markdown-body a { color: #7dd3fc; }
.markdown-body a:hover { color: #38bdf8; }
.markdown-body blockquote { border-left: 3px solid #38bdf8; margin: 0 0 0.85em; padding: 8px 16px; background: rgba(56,189,248,0.05); color: #8fa8be; }
.markdown-body hr { border: none; border-top: 1px solid #2c3e50; margin: 1.2em 0; }

/* ── Markdown body overrides for white-background report pages ──────── */
.rpt-doc .markdown-body { color: #1e293b; }
.rpt-doc .markdown-body h1, .rpt-doc .markdown-body h2, .rpt-doc .markdown-body h3, .rpt-doc .markdown-body h4 { color: #0f172a; }
.rpt-doc .markdown-body code { background: #f1f5f9; color: #1e40af; }
.rpt-doc .markdown-body pre { background: #f8fafc; border-color: #e2e8f0; }
.rpt-doc .markdown-body pre code { color: #1e293b; }
.rpt-doc .markdown-body th { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.rpt-doc .markdown-body td { color: #334155; border-color: #f1f5f9; }
.rpt-doc .markdown-body tbody tr:hover td { background: #f8fafc; }
.rpt-doc .markdown-body a { color: #2563eb; }
.rpt-doc .markdown-body a:hover { color: #1d4ed8; }
.rpt-doc .markdown-body blockquote { border-color: #3b82f6; background: rgba(59,130,246,0.05); color: #475569; }
.rpt-doc .markdown-body hr { border-color: #e2e8f0; }


/* ── Lifecycle badges ────────────────────────────────────────────────── */
.please-badge--lifecycle-planned      { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.please-badge--lifecycle-in_progress  { background: rgba(56,189,248,0.15);  color: #38bdf8; border: 1px solid rgba(56,189,248,0.3); }
.please-badge--lifecycle-completed    { background: rgba(52,211,153,0.15);  color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.please-badge--lifecycle-cancelled    { background: rgba(248,113,113,0.15); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }

/* ── Project card lifecycle border ──────────────────────────────────── */
.please-project-card--lifecycle-in_progress { border-left-color: #38bdf8; }
.please-project-card--lifecycle-planned     { border-left-color: #4b6882; }
.please-project-card--lifecycle-completed   { border-left-color: #34d399; }
.please-project-card--lifecycle-cancelled   { border-left-color: #f87171; }

/* ── Project description / repo ─────────────────────────────────────── */
.please-project-desc { color: #8fa8be; font-size: 0.9rem; margin: 8px 0 0; line-height: 1.55; }
.please-project-repo { font-size: 0.83rem; margin: 6px 0 0; }
.please-project-repo a { word-break: break-all; }

/* ── Project relations ───────────────────────────────────────────────── */
.please-relations-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid #2c3e50; border-radius: 8px; background: #1b2736; }
.please-relations-table { width: 100%; border-collapse: collapse; font-size: 0.855rem; }
.please-relations-table th { text-align: left; padding: 9px 14px; color: #8fa8be; background: #141d26; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; border-bottom: 1px solid #2c3e50; }
.please-relations-table td { padding: 9px 14px; border-bottom: 1px solid #1e2d3d; color: #c8d9e6; vertical-align: top; }
.please-relations-table tbody tr:last-child td { border-bottom: none; }
.please-relations-table tbody tr:hover td { background: #243347; }
.please-relations-table__rel { color: #8fa8be; white-space: nowrap; }
.please-relations-table a { color: #93c5fd; text-decoration: none; }
.please-relations-table a:hover { text-decoration: underline; }

/* ── Design rule rows (clickable + expandable) ───────────────────────── */
.please-rule-row { cursor: pointer; }
.please-rule-row:hover td { background: rgba(99,130,167,0.07); }
.please-rule-row--expanded td { background: rgba(99,130,167,0.1); }
.please-rule-row--waived td { opacity: 0.75; }
.please-rule-detail-row td { padding: 0; background: rgba(99,130,167,0.05); border-bottom: 1px solid rgba(99,130,167,0.15); }
.please-rule-detail { padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 6px; }
.please-rule-detail__row { display: flex; gap: 12px; align-items: flex-start; font-size: 0.85rem; }
.please-rule-detail__row--justification { background: rgba(248,113,113,0.07); border-radius: 5px; padding: 6px 8px; margin: 2px 0; }
.please-rule-detail__label { min-width: 96px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #8fa8be; padding-top: 2px; }
.please-rule-detail__devs { display: flex; flex-direction: column; gap: 6px; }
.please-deviation-chip { display: flex; gap: 8px; align-items: baseline; background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2); border-radius: 5px; padding: 4px 10px; font-size: 0.82rem; text-decoration: none; color: inherit; }
.please-deviation-chip:hover { background: rgba(248,113,113,0.15); }
.please-deviation-chip code { color: #f87171; flex-shrink: 0; }
.please-deviation-chip span { color: #8fa8be; }

/* ── Deviation banner (test case detail) ─────────────────────────────── */
.please-deviation-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.25); border-radius: 6px; padding: 10px 14px; margin: 0 0 16px; }
.please-deviation-banner--expired { background: rgba(148,163,184,0.08); border-color: rgba(148,163,184,0.25); }
.please-deviation-banner__label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #f87171; flex-shrink: 0; }
.please-deviation-banner--expired .please-deviation-banner__label { color: #94a3b8; }
.please-deviation-banner__justification { font-size: 0.88rem; color: #e2e8f0; flex: 1; }
.please-deviation-banner__meta { font-size: 0.78rem; color: #8fa8be; }

/* ── Milestones section ──────────────────────────────────────────────── */
.please-milestone-late { color: #f87171; font-weight: 600; }
.please-ms-title { display: block; }
.please-ms-body  { display: block; font-size: 0.78rem; color: #6382a3; margin-top: 2px; }
html[data-theme="light"] .please-ms-body { color: #64748b; }
.please-ms-tcs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.please-ms-tc { font-size: 0.72rem; font-family: monospace; padding: 2px 7px; border-radius: 4px; text-decoration: none; border: 1px solid; white-space: nowrap; }
.please-ms-tc--pass { background: rgba(74,222,128,0.12); border-color: rgba(74,222,128,0.35); color: #4ade80; }
.please-ms-tc--fail { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.35); color: #f87171; }
.please-ms-tc--warn,.please-ms-tc--idle,.please-ms-tc--open { background: rgba(148,163,184,0.1); border-color: rgba(148,163,184,0.3); color: #94a3b8; }
.please-ms-tc:hover { filter: brightness(1.25); }
.please-section-hint { text-align: right; font-size: 0.82rem; margin-top: 10px; color: #6382a3; }
.please-section-hint a { color: #6382a3; }
.please-section-hint a:hover { color: #93c5fd; }

/* ── Netlist viewer ──────────────────────────────────────────────────── */
.netlist-header { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.netlist-header__rev { font-weight: 700; font-size: 0.9rem; color: #e2e8f0; background: rgba(99,130,167,0.15); border: 1px solid rgba(99,130,167,0.3); border-radius: 4px; padding: 2px 8px; }
.netlist-header__stat { font-size: 0.82rem; color: #8fa8be; }
.netlist-net-row { cursor: pointer; }
.netlist-net-row:hover td { background: rgba(99,130,167,0.07); }
.netlist-net-row--expanded td { background: rgba(99,130,167,0.1); }
.netlist-pins-row td { padding: 4px 12px 10px 24px; background: rgba(99,130,167,0.05); border-bottom: 1px solid rgba(99,130,167,0.15); }
.netlist-pins { display: flex; flex-wrap: wrap; gap: 6px; }
.netlist-pin { font-size: 0.78rem; font-family: monospace; background: rgba(99,130,167,0.12); border: 1px solid rgba(99,130,167,0.2); border-radius: 4px; padding: 2px 7px; color: #a0bcd4; }

/* ── Lifecycle group headers (project list) ──────────────────────────── */
.please-lifecycle-group-header { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 24px 0 8px; display: flex; align-items: center; gap: 8px; }
.please-lifecycle-group-header--planned     { color: #94a3b8; }
.please-lifecycle-group-header--in_progress { color: #38bdf8; }
.please-lifecycle-group-header--completed   { color: #34d399; }
.please-lifecycle-group-header--cancelled   { color: #f87171; }
.please-lifecycle-group-count { background: rgba(255,255,255,0.06); border-radius: 10px; padding: 1px 8px; font-weight: 600; font-size: 0.85em; }

/* ── Audit diff table ────────────────────────────────────────────────── */
.audit-diff { margin-top: 0.5rem; }
.audit-diff-table { border-collapse: collapse; font-size: 0.8rem; width: 100%; }
.audit-diff-table th { text-align: left; padding: 4px 10px; color: #8fa8be; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid #2c3e50; background: #141d26; }
.audit-diff-table td { padding: 5px 10px; border-bottom: 1px solid #1e2d3d; vertical-align: top; word-break: break-word; max-width: 280px; }
.diff-field { color: #8fa8be; font-style: italic; white-space: nowrap; }
.diff-before { color: #f87171; background: rgba(248,113,113,0.06); }
.diff-after  { color: #34d399; background: rgba(52,211,153,0.06); }

/* ── PLEASE home info / changelog ───────────────────────────────────── */
.please-home-info { margin-top: 72px; padding-top: 20px; border-top: 1px solid #2c3e50; }
.please-version-line { font-size: 0.8rem; color: #506070; margin-bottom: 16px; }
.please-changelog h3 { font-size: 0.78rem; font-weight: 700; color: #8fa8be; text-transform: uppercase; letter-spacing: 0.07em; margin: 0 0 12px; }
.please-release { background: #1b2736; border: 1px solid #2c3e50; border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; }
.please-release__version { font-size: 0.875rem; font-weight: 700; color: #38bdf8; margin-right: 12px; }
.please-release__date { font-size: 0.78rem; color: #506070; }
.please-release .markdown-body { margin-top: 10px; font-size: 0.85rem; }
html[data-theme="light"] .please-changelog h3 { color: #4a6278; }
html[data-theme="light"] .please-version-line { color: #7a9ab0; }
html[data-theme="light"] .please-release { background: #ffffff; border-color: #d1dce8; }
html[data-theme="light"] .please-release__version { color: #0284c7; }
html[data-theme="light"] .please-release__date { color: #7a9ab0; }
html[data-theme="light"] .please-home-info { border-top-color: #d1dce8; }

/* ── Timeline ────────────────────────────────────────────────────────── */
.timeline-toolbar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 20px; }
.please-filter-select { background: #1b2736; border: 1px solid #2c3e50; color: #e2e8f0; padding: 6px 10px; border-radius: 5px; font-size: 0.85rem; }
.please-filter-select:focus { outline: none; border-color: #38bdf8; }
.timeline-day-header { font-size: 0.72rem; font-weight: 700; color: #506070; text-transform: uppercase; letter-spacing: 0.07em; padding: 20px 0 6px; border-bottom: 1px solid #2c3e50; margin-bottom: 4px; }
.timeline-event { display: grid; grid-template-columns: 44px 12px 1fr; gap: 0 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid rgba(44,62,80,0.4); }
.timeline-event:last-child { border-bottom: none; }
.timeline-event__time { font-size: 0.75rem; color: #506070; padding-top: 2px; text-align: right; white-space: nowrap; }
.timeline-event__dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.timeline-event__dot--pass { background: #34d399; box-shadow: 0 0 5px rgba(52,211,153,0.4); }
.timeline-event__dot--fail { background: #f87171; box-shadow: 0 0 5px rgba(248,113,113,0.4); }
.timeline-event__dot--warn { background: #fbbf24; box-shadow: 0 0 5px rgba(251,191,36,0.4); }
.timeline-event__dot--idle { background: #4b6882; }
.timeline-event__body { min-width: 0; }
.timeline-event__main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.875rem; }
.timeline-event__entity { color: #8fa8be; }
.timeline-event__id { font-family: monospace; font-size: 0.8rem; color: #7dd3fc; }
.timeline-event__meta { font-size: 0.78rem; color: #506070; margin-top: 2px; }

/* ── GRR study detail ────────────────────────────────────────────────── */
.please-grr-verdict { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.please-grr-verdict__reason { margin: 0; font-size: 0.875rem; color: #94a3b8; line-height: 1.6; max-width: 600px; }
.please-badge--lg { font-size: 0.9rem; padding: 4px 14px; white-space: nowrap; flex-shrink: 0; }
.please-grr-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.please-grr-stat { display: flex; flex-direction: column; align-items: center; min-width: 110px; padding: 10px 16px; border-radius: 8px; background: #1b2736; border: 1px solid #2c3e50; }
.please-grr-stat__label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.6; margin-bottom: 4px; }
.please-grr-stat__value { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.please-grr-stat--pass { border-color: rgba(52,211,153,0.35); color: #34d399; }
.please-grr-stat--warn { border-color: rgba(251,191,36,0.35); color: #fbbf24; }
.please-grr-stat--fail { border-color: rgba(248,113,113,0.35); color: #f87171; }
html[data-theme="light"] .please-grr-stat { background: #ffffff; border-color: #d1dce8; }
html[data-theme="light"] .please-grr-stat--pass { border-color: rgba(22,163,74,0.4); color: #15803d; }
html[data-theme="light"] .please-grr-stat--warn { border-color: rgba(180,83,9,0.4); color: #b45309; }
html[data-theme="light"] .please-grr-stat--fail { border-color: rgba(185,28,28,0.4); color: #b91c1c; }
html[data-theme="light"] .please-grr-verdict__reason { color: #4a6278; }

/* ── Help page layout ────────────────────────────────────────────────── */
.please-help-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; min-height: 400px; }
.please-help-sidebar { background: #1b2736; border: 1px solid #2c3e50; border-radius: 8px; padding: 12px 0; overflow-y: auto; max-height: 75vh; }
.please-help-sidebar-item { display: block; padding: 8px 16px; font-size: 0.85rem; color: #8fa8be; text-decoration: none; cursor: pointer; transition: background 0.1s, color 0.1s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.please-help-sidebar-item:hover { background: rgba(56,189,248,0.08); color: #e2e8f0; }
.please-help-sidebar-item--active { background: rgba(56,189,248,0.12); color: #38bdf8; font-weight: 600; }
.please-help-content { background: #1b2736; border: 1px solid #2c3e50; border-radius: 8px; padding: 24px 28px; overflow-y: auto; max-height: 75vh; }

/* ── Project detail sidebar layout ──────────────────────────────────── */
.please-project-layout { display: grid; grid-template-columns: 216px 1fr; border: 1px solid #2c3e50; border-radius: 10px; overflow: hidden; background: #141d26; min-height: 500px; }
.please-project-layout--collapsed { grid-template-columns: 46px 1fr; }

.please-project-sidebar { background: #141d26; border-right: 1px solid #2c3e50; display: flex; flex-direction: column; overflow: hidden; }

.please-sidebar-collapse-btn { display: flex; align-items: center; justify-content: flex-end; padding: 7px 12px; background: none; border: none; border-bottom: 1px solid #2c3e50; color: #506070; cursor: pointer; font-size: 0.95rem; width: 100%; flex-shrink: 0; transition: color 0.12s; user-select: none; line-height: 1; }
.please-sidebar-collapse-btn:hover { color: #38bdf8; }
.please-project-layout--collapsed .please-sidebar-collapse-btn { justify-content: center; }

.please-sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 0; }

.please-sidebar-item { display: flex; align-items: center; gap: 7px; padding: 8px 14px 8px 12px; width: 100%; background: none; border: none; border-left: 2px solid transparent; color: #8fa8be; font-size: 0.845rem; cursor: pointer; text-align: left; transition: background 0.1s, color 0.1s, border-color 0.1s; white-space: nowrap; overflow: hidden; }
.please-sidebar-item:hover { background: rgba(56,189,248,0.06); color: #e2e8f0; }
.please-sidebar-item--active { background: rgba(56,189,248,0.1); border-left-color: #38bdf8; color: #38bdf8; font-weight: 600; }

.please-sidebar-item__ico { width: 1.15em; flex: none; text-align: center; opacity: 0.8; font-size: 0.95em; }
.please-sidebar-item__label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.please-project-layout--collapsed .please-sidebar-item__ico { font-size: 1.05em; opacity: 0.9; }
.please-sidebar-item__count { font-size: 0.7rem; color: #506070; background: rgba(255,255,255,0.05); border-radius: 10px; padding: 1px 7px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.please-sidebar-item--active .please-sidebar-item__count { color: rgba(56,189,248,0.65); background: rgba(56,189,248,0.1); }
.please-sidebar-item__warn-dot { width: 6px; height: 6px; background: #fbbf24; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 4px rgba(251,191,36,0.5); }

.please-project-layout--collapsed .please-sidebar-item { padding: 10px; justify-content: center; }
.please-project-layout--collapsed .please-sidebar-item__label { display: none; }
.please-project-layout--collapsed .please-sidebar-item__count { display: none; }

.please-project-main { background: #1b2736; padding: 20px 24px; overflow: auto; min-width: 0; }

/* Mobile hamburger — hidden on desktop */
.please-sidebar-mobile-bar { display: none; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #2c3e50; }
.please-sidebar-toggle { display: none; background: #141d26; border: 1px solid #2c3e50; color: #8fa8be; padding: 7px 11px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; transition: border-color 0.12s, color 0.12s; }
.please-sidebar-toggle:hover { border-color: #38bdf8; color: #38bdf8; }
.please-mobile-section-label { font-size: 0.875rem; font-weight: 600; color: #e2e8f0; }
.please-sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 199; cursor: pointer; }

/* Requirement rows tinted by coverage gap */
.please-tr--gap-missing td { background: rgba(248,113,113,0.04); }
.please-tr--gap-weak td { background: rgba(251,191,36,0.04); }
.please-table tbody tr.please-tr--gap-missing:hover td { background: rgba(248,113,113,0.08); }
.please-table tbody tr.please-tr--gap-weak:hover td { background: rgba(251,191,36,0.08); }
.please-tr--obsolete td { opacity: 0.45; }
.please-table tbody tr.please-tr--obsolete:hover td { opacity: 0.65; }

/* Project health — card border */
.please-project-card--health-blocked { border-left: 3px solid hsl(0,70%,50%) !important; }
.please-project-card--health-warning { border-left: 3px solid hsl(38,80%,55%) !important; }

/* Project health — inline badges */
.please-badge--health-blocked { background: hsl(0,60%,18%); color: hsl(0,70%,65%); border: 1px solid hsl(0,60%,35%); }
.please-badge--health-warning { background: hsl(38,60%,18%); color: hsl(38,80%,65%); border: 1px solid hsl(38,60%,35%); }

/* Project health — detail page banner */
.please-health-banner {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1rem; border-radius: 6px; margin-bottom: 1rem;
    font-size: 0.875rem;
}
.please-health-banner--blocked {
    background: hsl(0,60%,14%); color: hsl(0,70%,70%); border: 1px solid hsl(0,60%,30%);
}
.please-health-banner--warning {
    background: hsl(38,60%,14%); color: hsl(38,80%,70%); border: 1px solid hsl(38,60%,30%);
}
.please-health-banner__icon { font-size: 1rem; }
.please-health-banner__title { font-weight: 600; }
.please-health-banner__detail { opacity: 0.85; }
.please-health-banner__detail a { color: inherit; text-decoration: underline; }
.please-health-banner__detail a:hover { opacity: 1; }

@media (max-width: 768px) {
    .please-project-layout { grid-template-columns: 1fr; border-radius: 8px; }

    .please-project-sidebar {
        position: fixed; top: 48px; left: 0; bottom: 0; width: 280px; z-index: 200;
        border-right: 1px solid #3d5166; box-shadow: 4px 0 24px rgba(0,0,0,0.65);
        transform: translateX(-100%); transition: transform 0.22s ease; border-radius: 0;
    }
    .please-project-sidebar--open { transform: translateX(0); }
    .please-sidebar-nav { padding-top: 14px; }
    .please-sidebar-collapse-btn { display: none; }
    .please-sidebar-mobile-bar { display: flex; }
    .please-sidebar-toggle { display: block; }
    .please-project-main { padding: 16px; }

    /* General narrow-screen breathing room + overflow containment */
    .please-page { padding: 18px 14px 36px; }
    .please-page__header { flex-wrap: wrap; }
    .please-health-banner { flex-wrap: wrap; }
    .rpt-section { overflow-x: auto; }
}

/* ══════════════════════════════════════════════════════════════════════════
   APPLICATION NAV BAR
   ═══════════════════════════════════════════════════════════════════════ */

/* App shell: persistent left side-nav + content column (mobile: nav becomes a drawer). */
.app-shell { flex: 1; min-height: 0; display: flex; }
.app-content { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }

.app-sidenav {
    width: 208px; flex: none; display: flex; flex-direction: column;
    background: #0f1923; border-right: 1px solid #1e2d3d; z-index: 500;
}

.app-sidenav__brand {
    display: flex; align-items: center; gap: 10px; text-decoration: none;
    padding: 14px 18px; border-bottom: 1px solid #1e2d3d; flex-shrink: 0;
}
.app-sidenav__brand-name {
    font-size: 0.95rem; font-weight: 800; letter-spacing: 0.04em;
    text-transform: uppercase; color: #e2e8f0;
}

.app-sidenav__links { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; flex: 1; overflow-y: auto; }

.app-sidenav__link {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px;
    color: #8fa8be; font-size: 0.875rem; font-weight: 500; text-decoration: none;
    transition: color 0.12s, background 0.12s; white-space: nowrap;
}
.app-sidenav__link:hover { color: #e2e8f0; background: rgba(255,255,255,0.04); }
.app-sidenav__link.active { color: #38bdf8; background: rgba(56,189,248,0.1); font-weight: 600; }
.app-sidenav__ico { width: 1.2em; flex: none; text-align: center; opacity: 0.85; }
.app-sidenav__label { flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* Expandable section group (e.g. PLEASE area pages) */
.app-sidenav__group { display: flex; flex-direction: column; }
.app-sidenav__grouphdr { display: flex; align-items: center; }
.app-sidenav__grouphdr .app-sidenav__link { flex: 1; }
.app-sidenav__expander { background: none; border: none; color: #8fa8be; cursor: pointer; padding: 6px 12px; display: flex; align-items: center; }
.app-sidenav__expander:hover { color: #e2e8f0; }
.app-sidenav__sublinks { display: flex; flex-direction: column; gap: 1px; margin: 1px 0 4px; }
.app-sidenav__sublink { display: block; padding: 7px 12px 7px 38px; border-radius: 7px; color: #7c92a8; font-size: 0.83rem; text-decoration: none; white-space: nowrap; transition: color 0.12s, background 0.12s; }
.app-sidenav__sublink:hover { color: #e2e8f0; background: rgba(255,255,255,0.04); }
.app-sidenav__sublink.active { color: #38bdf8; background: rgba(56,189,248,0.1); font-weight: 600; }

.app-sidenav__actions { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid #1e2d3d; flex-shrink: 0; }
.app-sidenav__user { width: 30px; height: 30px; border-radius: 50%; background: rgba(56,189,248,0.12); color: #38bdf8; display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; }
.app-sidenav__action-btn, .app-sidenav__theme-btn {
    background: none; border: 1px solid #2c3e50; color: #8fa8be;
    width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.12s, color 0.12s; padding: 0;
}
.app-sidenav__action-btn:hover, .app-sidenav__theme-btn:hover { border-color: #38bdf8; color: #38bdf8; }
.app-sidenav__theme-btn { margin-left: auto; }

/* Mobile top bar + drawer backdrop (hidden on desktop) */
.app-topbar { display: none; }
.app-topbar__burger { background: none; border: none; color: inherit; font-size: 1.35rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.app-topbar__brand { font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.9rem; color: inherit; text-decoration: none; }
.app-nav-backdrop { display: none; }

@media (max-width: 768px) {
    .app-sidenav {
        position: fixed; top: 0; left: 0; bottom: 0; width: 240px;
        transform: translateX(-100%); transition: transform 0.22s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,0.55);
    }
    .app-sidenav--open { transform: translateX(0); }
    .app-nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 480; }
    .app-topbar {
        display: flex; align-items: center; gap: 10px; height: 48px; flex-shrink: 0;
        padding: 0 12px; background: #0f1923; border-bottom: 1px solid #1e2d3d; color: #e2e8f0;
    }
}

.app-main { flex: 1; min-height: 0; overflow-y: auto; }

/* ── Force-collapsed side-nav rail (desktop only; toggled via the « button) ── */
@media (min-width: 769px) {
    html[data-sidenav="collapsed"] .app-sidenav { width: 56px; }
    html[data-sidenav="collapsed"] .app-sidenav__label,
    html[data-sidenav="collapsed"] .app-sidenav__brand-name,
    html[data-sidenav="collapsed"] .app-sidenav__sublinks,
    html[data-sidenav="collapsed"] .app-sidenav__expander,
    html[data-sidenav="collapsed"] .app-sidenav__user { display: none; }
    html[data-sidenav="collapsed"] .app-sidenav__link,
    html[data-sidenav="collapsed"] .app-sidenav__sublink,
    html[data-sidenav="collapsed"] .app-sidenav__brand { justify-content: center; padding-left: 0; padding-right: 0; }
    html[data-sidenav="collapsed"] .app-sidenav__links { padding-left: 6px; padding-right: 6px; }
    html[data-sidenav="collapsed"] .app-sidenav__actions { flex-direction: column; gap: 8px; }
    html[data-sidenav="collapsed"] .app-sidenav__theme-btn { margin-left: 0; }
}
/* The collapse toggle is desktop-only — on mobile the nav is a full drawer. */
@media (max-width: 768px) { .app-sidenav__collapse-btn { display: none; } }

html, body { display: flex; flex-direction: column; height: 100%; margin: 0; }

/* Printing (e.g. PLEASE reports): drop the app chrome and let content flow full-height */
@media print {
    .app-sidenav, .app-topbar, .app-nav-backdrop { display: none !important; }
    .app-shell, .app-content { display: block; height: auto; min-height: 0; }
    .app-main { overflow: visible; height: auto; }
}

/* ══════════════════════════════════════════════════════════════════════════
   ORCHESTRA / FLEET MONITOR
   ═══════════════════════════════════════════════════════════════════════ */

.orch-page { }

.orch-last-refresh { font-size: 0.8rem; color: #506070; }

/* Station grid */
.orch-station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Station card */
.orch-station-card {
    background: #1b2736;
    border: 1px solid #2c3e50;
    border-top: 3px solid #38bdf8;
    border-radius: 10px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.14s, box-shadow 0.14s, border-top-color 0.14s;
    min-height: 120px;
}
.orch-station-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.orch-station-card--offline { border-top-color: #4b6882; opacity: 0.75; }
.orch-station-card--offline:hover { opacity: 1; }

.orch-station-card__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.orch-station-card__name { font-size: 1rem; font-weight: 700; color: #e2e8f0; }
.orch-station-card__test { font-size: 0.845rem; color: #8fa8be; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orch-station-card__step { font-size: 0.78rem; color: #506070; }
.orch-station-card__offline-msg { font-size: 0.82rem; color: #506070; font-style: italic; }
.orch-station-card__idle-msg { font-size: 0.82rem; color: #506070; }

.orch-station-card__footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

.orch-step-name { color: #506070; }

/* State badge */
.orch-state-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}
.orch-state-badge--running { background: rgba(56,189,248,0.12); color: #38bdf8; border: 1px solid rgba(56,189,248,0.3); }
.orch-state-badge--idle    { background: rgba(52,211,153,0.1);  color: #34d399; border: 1px solid rgba(52,211,153,0.25); }
.orch-state-badge--offline { background: rgba(75,104,130,0.15); color: #6b8fa8; border: 1px solid rgba(75,104,130,0.3); }
.orch-state-badge--lg { font-size: 0.8rem; padding: 4px 14px; }

/* Progress bar */
.orch-progress {
    height: 4px;
    background: #1e2d3d;
    border-radius: 2px;
    overflow: hidden;
}
.orch-progress--wide { height: 6px; border-radius: 3px; margin: 6px 0; }
.orch-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #7dd3fc);
    border-radius: 2px;
    transition: width 0.4s ease;
    min-width: 2px;
}

/* Version + tag chips */
.orch-version { font-size: 0.72rem; color: #506070; font-family: monospace; }
.orch-tag { font-size: 0.68rem; color: #8fa8be; background: rgba(255,255,255,0.05); border: 1px solid #2c3e50; border-radius: 10px; padding: 1px 7px; }

/* Running card (station detail) */
.orch-running-card {
    background: #141d26;
    border: 1px solid #2c3e50;
    border-left: 3px solid #38bdf8;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.orch-running-card__test { font-size: 1.05rem; font-weight: 700; color: #e2e8f0; }
.orch-running-card__step { font-size: 0.855rem; color: #8fa8be; }
.orch-running-card__elapsed { font-size: 0.82rem; color: #506070; }

/* ══════════════════════════════════════════════════════════════════════════
   LIGHT THEME OVERRIDES
   Applied when <html data-theme="light">
   ═══════════════════════════════════════════════════════════════════════ */

html[data-theme="light"] {
    --lbg: #f0f4f8;
    --lsurface-0: #ffffff;
    --lsurface-1: #f8fafc;
    --lborder: #d1dce8;
    --ltext-pri: #1a2535;
    --ltext-sec: #4a6278;
    --ltext-muted: #7a9ab0;
    --laccent: #0284c7;
}

html[data-theme="light"] body {
    background-color: #f0f4f8;
    color: #1a2535;
}

html[data-theme="light"] select {
    background-color: #ffffff;
    color: #1a2535;
    border-color: #d1dce8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234a6278' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
}

/* Nav (side-nav + mobile top bar) */
html[data-theme="light"] .app-sidenav { background: #ffffff; border-right-color: #d1dce8; }
html[data-theme="light"] .app-sidenav__brand { border-bottom-color: #d1dce8; }
html[data-theme="light"] .app-sidenav__brand-name { color: #1a2535; }
html[data-theme="light"] .app-sidenav__link { color: #4a6278; }
html[data-theme="light"] .app-sidenav__link:hover { color: #1a2535; background: rgba(2,132,199,0.06); }
html[data-theme="light"] .app-sidenav__link.active { color: #0284c7; background: rgba(2,132,199,0.1); }
html[data-theme="light"] .app-sidenav__expander { color: #4a6278; }
html[data-theme="light"] .app-sidenav__expander:hover { color: #1a2535; }
html[data-theme="light"] .app-sidenav__sublink { color: #64748b; }
html[data-theme="light"] .app-sidenav__sublink:hover { color: #1a2535; background: rgba(2,132,199,0.06); }
html[data-theme="light"] .app-sidenav__sublink.active { color: #0284c7; background: rgba(2,132,199,0.1); }
html[data-theme="light"] .app-sidenav__actions { border-top-color: #d1dce8; }
html[data-theme="light"] .app-sidenav__user { background: rgba(2,132,199,0.1); color: #0284c7; }
html[data-theme="light"] .app-sidenav__action-btn,
html[data-theme="light"] .app-sidenav__theme-btn { border-color: #d1dce8; color: #4a6278; }
html[data-theme="light"] .app-sidenav__action-btn:hover,
html[data-theme="light"] .app-sidenav__theme-btn:hover { border-color: #0284c7; color: #0284c7; }
html[data-theme="light"] .app-topbar { background: #ffffff; border-bottom-color: #d1dce8; color: #1a2535; }

/* Stat badges */
html[data-theme="light"] .please-stat--pass { background: rgba(22,163,74,0.08); color: #15803d; border-color: rgba(22,163,74,0.22); }
html[data-theme="light"] .please-stat--warn { background: rgba(180,83,9,0.08);  color: #b45309; border-color: rgba(180,83,9,0.22);  }
html[data-theme="light"] .please-stat--fail { background: rgba(185,28,28,0.08); color: #b91c1c; border-color: rgba(185,28,28,0.22); }
html[data-theme="light"] .please-stat--idle { background: rgba(71,85,105,0.08); color: #475569; border-color: rgba(71,85,105,0.22); }

/* Metric badges */
html[data-theme="light"] .please-metric-badge--percent { background: hsl(var(--cov-hue,0),65%,93%); color: hsl(var(--cov-hue,0),60%,28%); border-color: hsl(var(--cov-hue,0),50%,72%); }
html[data-theme="light"] .please-metric-badge--high   { background: rgba(22,163,74,0.08);  color: #15803d; border-color: rgba(22,163,74,0.22);  }
html[data-theme="light"] .please-metric-badge--medium { background: rgba(180,83,9,0.08);   color: #b45309; border-color: rgba(180,83,9,0.22);   }
html[data-theme="light"] .please-metric-badge--low    { background: rgba(185,28,28,0.08);  color: #b91c1c; border-color: rgba(185,28,28,0.22);  }

/* Badges */
html[data-theme="light"] .please-badge--fail   { background: rgba(185,28,28,0.08);  color: #b91c1c; border-color: rgba(185,28,28,0.22);  }
html[data-theme="light"] .please-badge--warn   { background: rgba(180,83,9,0.08);   color: #b45309; border-color: rgba(180,83,9,0.22);   }
html[data-theme="light"] .please-badge--pass   { background: rgba(22,163,74,0.08);  color: #15803d; border-color: rgba(22,163,74,0.22);  }
html[data-theme="light"] .please-badge--idle   { background: rgba(71,85,105,0.08);  color: #475569; border-color: rgba(71,85,105,0.22);  }
html[data-theme="light"] .please-badge--info   { background: rgba(2,132,199,0.08);  color: #0369a1; border-color: rgba(2,132,199,0.22);  }
html[data-theme="light"] .please-badge--discipline { background: rgba(13,148,136,0.08); color: #0f766e; border-color: rgba(13,148,136,0.22); }
html[data-theme="light"] .please-badge--discipline-default { background: rgba(100,116,139,0.08); color: #64748b; border-color: rgba(100,116,139,0.35); }
html[data-theme="light"] .please-badge--ip     { background: rgba(180,83,9,0.08);   color: #b45309; border-color: rgba(180,83,9,0.22);   }
html[data-theme="light"] .please-badge--notice { background: rgba(194,65,12,0.08);  color: #c2410c; border-color: rgba(194,65,12,0.22);  }
html[data-theme="light"] .please-badge--health-blocked { background: hsl(0,65%,93%);  color: hsl(0,60%,28%);  border-color: hsl(0,50%,72%);  }
html[data-theme="light"] .please-badge--health-warning { background: hsl(38,65%,92%); color: hsl(38,55%,28%); border-color: hsl(38,50%,70%); }
html[data-theme="light"] .please-badge--lifecycle-planned     { background: rgba(71,85,105,0.08);   color: #475569; border-color: rgba(71,85,105,0.22);   }
html[data-theme="light"] .please-badge--lifecycle-in_progress { background: rgba(2,132,199,0.08);   color: #0369a1; border-color: rgba(2,132,199,0.22);   }
html[data-theme="light"] .please-badge--lifecycle-completed   { background: rgba(22,163,74,0.08);   color: #15803d; border-color: rgba(22,163,74,0.22);   }
html[data-theme="light"] .please-badge--lifecycle-cancelled   { background: rgba(185,28,28,0.08);   color: #b91c1c; border-color: rgba(185,28,28,0.22);   }

/* Health banners (project detail page) */
html[data-theme="light"] .please-health-banner--blocked { background: hsl(0,65%,95%);  color: hsl(0,60%,28%);  border-color: hsl(0,50%,78%);  }
html[data-theme="light"] .please-health-banner--warning { background: hsl(38,65%,94%); color: hsl(38,55%,28%); border-color: hsl(38,50%,76%); }
/* Links */
html[data-theme="light"] .please-page a                            { color: #2563eb; }
html[data-theme="light"] .please-page a:visited                    { color: #7c3aed; }
html[data-theme="light"] .please-page a:hover                      { color: #1d4ed8; }
html[data-theme="light"] .please-page a.please-back,
html[data-theme="light"] .please-page a.please-back:visited        { color: #64748b; }
html[data-theme="light"] .please-page a.please-back:hover          { color: #2563eb; }
html[data-theme="light"] .please-page a.please-link-btn,
html[data-theme="light"] .please-page a.please-link-btn:visited    { color: #64748b; }
html[data-theme="light"] .please-page a.please-link-btn:hover      { color: #2563eb; }
html[data-theme="light"] .please-page a.please-project-card,
html[data-theme="light"] .please-page a.please-project-card:visited { color: inherit; }
html[data-theme="light"] .please-page a.please-stat--pass,
html[data-theme="light"] .please-page a.please-stat--pass:visited  { color: #15803d; }
html[data-theme="light"] .please-page a.please-stat--warn,
html[data-theme="light"] .please-page a.please-stat--warn:visited  { color: #b45309; }
html[data-theme="light"] .please-page a.please-stat--fail,
html[data-theme="light"] .please-page a.please-stat--fail:visited  { color: #b91c1c; }
html[data-theme="light"] .please-page a.please-stat--idle,
html[data-theme="light"] .please-page a.please-stat--idle:visited  { color: #475569; }
html[data-theme="light"] .please-section-hint a                    { color: #4a6278; }
html[data-theme="light"] .please-section-hint a:hover              { color: #2563eb; }
html[data-theme="light"] .timeline-event__id                       { color: #2563eb; }
html[data-theme="light"] .please-timeline__action                  { color: #1a2535; }
html[data-theme="light"] .please-timeline__meta                    { color: #4a6278; }
html[data-theme="light"] .please-lifecycle-group-header--planned     { color: #64748b; }
html[data-theme="light"] .please-lifecycle-group-header--in_progress { color: #0369a1; }
html[data-theme="light"] .please-lifecycle-group-header--completed   { color: #15803d; }
html[data-theme="light"] .please-lifecycle-group-header--cancelled   { color: #b91c1c; }

/* PLEASE pages */
html[data-theme="light"] .please-page { background: transparent; }
html[data-theme="light"] .please-page__header h1 { color: #1a2535; }
html[data-theme="light"] .please-page__subtitle { color: #4a6278; }
html[data-theme="light"] .please-project-header { border-bottom-color: #d1dce8; }
html[data-theme="light"] .please-project-header__title { color: #1a2535; }
html[data-theme="light"] .please-project-header__sub { color: #4a6278; }
/* Must beat html[data-theme="light"] .please-page a { color: #2563eb } which has specificity (0,2,2) */
html[data-theme="light"] .please-page a.please-nav-btn,
html[data-theme="light"] .please-page a.please-nav-btn:visited { color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.18); }
html[data-theme="light"] .please-page a.please-nav-btn:hover   { color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,0.25); }
html[data-theme="light"] .please-project-header__metrics { border-color: #d1dce8; }
html[data-theme="light"] .please-project-metric { background: #f8fafc; border-right-color: #e2e8f0; }
html[data-theme="light"] .please-project-metric__value { color: #1a2535; }
html[data-theme="light"] .please-project-metric__label { color: #4a6278; }
html[data-theme="light"] .please-project-metric--pct { background: hsl(var(--cov-hue,0),65%,93%); }
html[data-theme="light"] .please-project-metric--pct .please-project-metric__value { color: hsl(var(--cov-hue,0),60%,28%); }
html[data-theme="light"] .please-project-metric--pct .please-project-metric__label { color: hsl(var(--cov-hue,0),40%,45%); }
html[data-theme="light"] .please-project-metric--warn { background: #fffbeb; }
html[data-theme="light"] .please-project-metric--warn .please-project-metric__value { color: #d97706; }
html[data-theme="light"] .please-project-metric--error { background: #fef2f2; }
html[data-theme="light"] .please-project-metric--error .please-project-metric__value { color: #dc2626; }
html[data-theme="light"] .please-relations-wrap { background: #ffffff; border-color: #d1dce8; }
html[data-theme="light"] .please-relations-table th { background: #f0f4f8; color: #4a6278; border-bottom-color: #d1dce8; }
html[data-theme="light"] .please-relations-table td { color: #1a2535; border-bottom-color: #e8eef4; }
html[data-theme="light"] .please-relations-table tbody tr:hover td { background: #f0f4f8; }
html[data-theme="light"] .please-relations-table__rel { color: #4a6278; }
html[data-theme="light"] .please-section h2 { color: #4a6278; border-bottom-color: #d1dce8; }
html[data-theme="light"] .please-table-wrap { background: #ffffff; border-color: #d1dce8; }
html[data-theme="light"] .please-table th { background: #f0f4f8; color: #4a6278; }
html[data-theme="light"] .please-table td { color: #1a2535; border-bottom-color: #e8eef4; }
html[data-theme="light"] .please-table tbody tr:hover td { background: #f0f4f8; }
html[data-theme="light"] .please-table code { color: #1e40af; background: rgba(37,99,235,0.07); }
/* Component-detail meta tables (Details / Properties) */
html[data-theme="light"] .comp-detail-meta th { color: #4a6278; }
html[data-theme="light"] .comp-detail-meta td { color: #1a2535; }
html[data-theme="light"] .comp-detail-eol { color: #b45309; }
html[data-theme="light"] .please-user-link { color: #2563eb; border-bottom-color: rgba(37,99,235,0.3); }
html[data-theme="light"] .please-nudge-link { color: #2563eb; }
html[data-theme="light"] .please-rule-detail__label { color: #64748b; }
html[data-theme="light"] .please-deviation-chip code { color: #b91c1c; }
html[data-theme="light"] .netlist-pin { color: #4a6278; background: rgba(74,98,120,0.07); border-color: rgba(74,98,120,0.2); }
html[data-theme="light"] .please-filter-input { background: #ffffff; border-color: #d1dce8; color: #1a2535; }
html[data-theme="light"] .please-filter-input:focus { border-color: #0284c7; }
html[data-theme="light"] .please-filter-select { background: #ffffff; border-color: #d1dce8; color: #1a2535; }
html[data-theme="light"] .please-filter-select:focus { border-color: #0284c7; }
html[data-theme="light"] .please-filter-clear { border-color: #d1dce8; color: #64748b; }
html[data-theme="light"] .please-filter-clear:hover { border-color: #0284c7; color: #1a2535; }
html[data-theme="light"] .please-project-card { background: #ffffff; border-color: #d1dce8; }
html[data-theme="light"] .please-project-card__title { color: #1a2535; }
html[data-theme="light"] .please-project-card__meta { color: #4a6278; }
html[data-theme="light"] .please-project-layout { background: #f0f4f8; border-color: #d1dce8; }
html[data-theme="light"] .please-project-sidebar { background: #ffffff; border-right-color: #d1dce8; }
html[data-theme="light"] .please-sidebar-collapse-btn { border-bottom-color: #d1dce8; color: #7a9ab0; }
html[data-theme="light"] .please-sidebar-item { color: #4a6278; }
html[data-theme="light"] .please-sidebar-item:hover { background: rgba(2,132,199,0.06); color: #1a2535; }
html[data-theme="light"] .please-sidebar-item--active { background: rgba(2,132,199,0.08); border-left-color: #0284c7; color: #0284c7; }
html[data-theme="light"] .please-sidebar-item__count { color: #7a9ab0; background: rgba(0,0,0,0.04); }
html[data-theme="light"] .please-project-main { background: #f8fafc; }
html[data-theme="light"] .please-sidebar-mobile-bar { border-bottom-color: #d1dce8; }
html[data-theme="light"] .please-sidebar-toggle { background: #ffffff; border-color: #d1dce8; color: #4a6278; }
html[data-theme="light"] .please-sidebar-toggle:hover { border-color: #0284c7; color: #0284c7; }
html[data-theme="light"] .please-mobile-section-label { color: #1a2535; }
html[data-theme="light"] .please-memory__item { background: #ffffff; border-color: #d1dce8; border-left-color: #0284c7; }
html[data-theme="light"] .please-memory__statement { color: #1a2535; }
html[data-theme="light"] .please-loading { color: #4a6278; }
html[data-theme="light"] .please-empty { color: #7a9ab0; }
html[data-theme="light"] .please-error { background: rgba(220,38,38,0.05); border-color: rgba(220,38,38,0.25); color: #b91c1c; }
html[data-theme="light"] .please-nudge--warn { background: rgba(217,119,6,0.05); border-color: rgba(217,119,6,0.3); color: #92400e; }

/* Home landing */
html[data-theme="light"] .home-landing__title { color: #1a2535; }
html[data-theme="light"] .home-landing__subtitle { color: #4a6278; }
html[data-theme="light"] .home-landing__card { background: #ffffff; border-color: #d1dce8; color: #1a2535; }
html[data-theme="light"] .home-landing__card:hover { border-color: #0284c7; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
html[data-theme="light"] .home-landing__card-title { color: #1a2535; }
html[data-theme="light"] .home-landing__card-desc { color: #4a6278; }

/* Orchestra */
html[data-theme="light"] .orch-station-card { background: #ffffff; border-color: #d1dce8; border-top-color: #0284c7; }
html[data-theme="light"] .orch-station-card--offline { border-top-color: #94a3b8; }
html[data-theme="light"] .orch-station-card__name { color: #1a2535; }
html[data-theme="light"] .orch-station-card__test { color: #4a6278; }
html[data-theme="light"] .orch-running-card { background: #f8fafc; border-color: #d1dce8; border-left-color: #0284c7; }
html[data-theme="light"] .orch-running-card__test { color: #1a2535; }
html[data-theme="light"] .orch-progress { background: #e2eaf2; }
html[data-theme="light"] .orch-progress__bar { background: linear-gradient(90deg, #0284c7, #38bef8); }
html[data-theme="light"] .orch-tag { color: #4a6278; background: rgba(0,0,0,0.04); border-color: #d1dce8; }
html[data-theme="light"] .orch-version { color: #7a9ab0; }

/* Markdown */
html[data-theme="light"] .markdown-body { color: #1a2535; }
html[data-theme="light"] .markdown-body h1, html[data-theme="light"] .markdown-body h2,
html[data-theme="light"] .markdown-body h3, html[data-theme="light"] .markdown-body h4 { color: #0f1c29; }
html[data-theme="light"] .markdown-body code { background: #e8f0f8; color: #0284c7; }
html[data-theme="light"] .markdown-body pre { background: #f0f4f8; border-color: #d1dce8; }
html[data-theme="light"] .markdown-body pre code { background: none; color: #1a2535; }
html[data-theme="light"] .markdown-body td { color: #1a2535; border-bottom-color: #e8eef4; }
html[data-theme="light"] .markdown-body th { background: #f0f4f8; color: #4a6278; border-bottom-color: #d1dce8; }
html[data-theme="light"] .markdown-body tbody tr:hover td { background: #f0f4f8; }
html[data-theme="light"] .markdown-body a { color: #0284c7; }
html[data-theme="light"] .markdown-body a:hover { color: #0369a1; }
html[data-theme="light"] .markdown-body blockquote { border-left-color: #0284c7; background: rgba(2,132,199,0.05); color: #4a6278; }
html[data-theme="light"] .markdown-body hr { border-top-color: #d1dce8; }

/* Component library */
html[data-theme="light"] .comp-lib-search, html[data-theme="light"] .comp-lib-status-filter { background: #ffffff; border-color: #d1dce8; color: #1a2535; }
html[data-theme="light"] .please-btn { background: #ffffff; border-color: #d1dce8; color: #4a6278; }
html[data-theme="light"] .please-btn:hover:not([disabled]) { border-color: #0284c7; color: #0284c7; }

/* ── Orchestra lock banner ───────────────────────────────────────────────── */

.orch-lock-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 6px;
    color: #fbbf24;
    font-size: 0.875rem;
}

.orch-lock-banner__expiry { opacity: 0.7; font-size: 0.78rem; }

/* ── Capability editor ───────────────────────────────────────────────────── */

.orch-caps-editor { margin-top: 0.5rem; }
.orch-caps-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

.orch-cap-input {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    color: #E0E4EA;
    border-radius: 4px;
    padding: 0.25rem 0.4rem;
    font-size: 0.82rem;
}

.orch-caps-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.orch-cap-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.77rem;
    background: rgba(56,189,248,0.1);
    border: 1px solid rgba(56,189,248,0.22);
    color: #38bdf8;
}

.orch-cap-badge code { font-size: 0.75rem; }

.please-btn--danger { color: #f87171; border-color: rgba(248,113,113,0.3); }
.please-btn--danger:hover:not([disabled]) { background: rgba(248,113,113,0.1); }

.orch-tag--locked { background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.35); color: #fbbf24; }

/* ── Milestone Timeline ───────────────────────────────────────────────────── */

.milestone-track-container {
    overflow-x: auto;
    padding: 0 1rem 1rem;
    margin-bottom: 2rem;
}

.milestone-track {
    position: relative;
    height: 340px;
    min-width: 700px;
}

.milestone-track__line {
    position: absolute;
    top: 140px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2c3e50;
    border-radius: 1px;
}

.milestone-node {
    position: absolute;
    height: 340px;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    z-index: 1;
}

.milestone-node__dot {
    position: absolute;
    top: 133px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #141d26;
    z-index: 1;
}

.milestone-node--achieved .milestone-node__dot  { background: #34d399; box-shadow: 0 0 8px rgba(52,211,153,0.4); }
.milestone-node--late     .milestone-node__dot  { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,0.35); }
.milestone-node--upcoming .milestone-node__dot  { background: #38bdf8; }
.milestone-node--cancelled .milestone-node__dot { background: #506070; }

.milestone-node__label {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 120px;
    text-align: center;
}

.milestone-node__label--below { top: 158px; }
.milestone-node__label--above { bottom: 208px; }

.milestone-node__code {
    font-size: 0.75rem;
    font-weight: 600;
    color: #e2e8f0;
    font-family: monospace;
}

.milestone-node__title {
    font-size: 0.72rem;
    color: #8fa8be;
    line-height: 1.3;
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
}

.milestone-node__date {
    font-size: 0.68rem;
    color: #506070;
    font-family: monospace;
}

.milestone-node__plan {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 2px;
    font-family: monospace;
}

.milestone-node__plan--draft    { background: rgba(80,96,112,0.2); color: #506070; border: 1px solid rgba(80,96,112,0.3); }
.milestone-node__plan--approved { background: rgba(56,189,248,0.1); color: #38bdf8; border: 1px solid rgba(56,189,248,0.25); }
.milestone-node__plan--released { background: rgba(52,211,153,0.1); color: #34d399; border: 1px solid rgba(52,211,153,0.25); }

/* Tooltip — appears in the zone opposite the label */
.milestone-node__tooltip {
    display: none;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: #0d1921;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 6px;
    padding: 8px 12px;
    width: 180px;
    z-index: 20;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.milestone-node--label-above .milestone-node__tooltip { top: 158px; }

.milestone-node:hover .milestone-node__tooltip { display: flex; }

.milestone-node__tooltip-code {
    font-size: 0.75rem;
    font-weight: 700;
    color: #38bdf8;
    font-family: monospace;
}

.milestone-node__tooltip-title {
    font-size: 0.72rem;
    color: #e2e8f0;
    line-height: 1.3;
    white-space: normal;
}

.milestone-node__tooltip-body {
    font-size: 0.70rem;
    color: #94a3b8;
    line-height: 1.4;
    white-space: normal;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 4px;
    margin-top: 2px;
}

.milestone-node__tooltip-date {
    font-size: 0.68rem;
    color: #8fa8be;
    font-family: monospace;
}

.milestone-today {
    position: absolute;
    top: 100px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.milestone-today__line {
    width: 1px;
    height: 80px;
    background: rgba(248,113,113,0.6);
}

.milestone-today__label {
    font-size: 0.65rem;
    color: #f87171;
    margin-top: 4px;
    white-space: nowrap;
}

.milestone-track-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #8fa8be;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem 0;
    border-top: 1px solid #2c3e50;
    margin-top: 0.5rem;
}

/* ── Milestone Timeline — light theme overrides ────────────────────────── */
html[data-theme="light"] .milestone-track__line           { background: #cbd5e1; }
html[data-theme="light"] .milestone-node__dot             { border-color: #fff; }
html[data-theme="light"] .milestone-node__code            { color: #1e293b; }
html[data-theme="light"] .milestone-node__title           { color: #475569; }
html[data-theme="light"] .milestone-node__date            { color: #94a3b8; }
html[data-theme="light"] .milestone-track-label           { color: #64748b; border-top-color: #e2e8f0; }
html[data-theme="light"] .milestone-node__plan--draft     { background: rgba(100,116,139,0.1); color: #475569;  border-color: rgba(100,116,139,0.25); }
html[data-theme="light"] .milestone-node__plan--approved  { background: rgba(2,132,199,0.08);  color: #0369a1;  border-color: rgba(2,132,199,0.2); }
html[data-theme="light"] .milestone-node__plan--released  { background: rgba(22,163,74,0.08);  color: #15803d;  border-color: rgba(22,163,74,0.2); }
html[data-theme="light"] .milestone-node__tooltip         { background: #1e293b; border-color: rgba(56,189,248,0.35); }
html[data-theme="light"] .milestone-undated__heading      { color: #475569; }
html[data-theme="light"] .milestone-today__label          { color: #dc2626; }
html[data-theme="light"] .milestone-today__line           { background: rgba(220,38,38,0.5); }

.milestone-undated {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #2c3e50;
}

.milestone-undated__heading {
    font-size: 0.85rem;
    font-weight: 600;
    color: #8fa8be;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Maestro tag filters ──────────────────────────────────────────────────── */

.please-maestro-filters { margin-bottom: 1.5rem; }
.please-maestro-filters h3 { font-size: 1rem; font-weight: 600; color: #c8d8e8; margin: 0 0 0.5rem; }

.please-tag-filter-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }

.please-tag-filter-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.25);
    border-radius: 6px; padding: 4px 8px; font-size: 0.83rem; color: #8fa8be;
}
.please-tag-filter-chip code { font-size: 0.81rem; color: #38bdf8; }

.please-tag-filter-chip__remove {
    background: none; border: none; cursor: pointer;
    color: #6b8099; font-size: 1rem; line-height: 1;
    padding: 0 2px; border-radius: 3px; transition: color 0.1s;
}
.please-tag-filter-chip__remove:hover { color: #f87171; }

.please-tag-filter-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.please-tag-filter-form .please-filter-input { max-width: 220px; }

.please-btn--primary { color: #38bdf8; border-color: rgba(56,189,248,0.4); }
.please-btn--primary:hover:not([disabled]) { background: rgba(56,189,248,0.1); border-color: #38bdf8; }

/* ── DUT cards ────────────────────────────────────────────────────────────── */

.please-dut-list { display: flex; flex-direction: column; gap: 0.75rem; }

.please-dut-card {
    background: #0f1a25; border: 1px solid #2c3e50;
    border-radius: 8px; overflow: hidden;
}
.please-dut-card--expanded { border-color: rgba(56,189,248,0.3); }

.please-dut-card__header {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.7rem 1rem; user-select: none;
}
.please-dut-card__header:hover { background: rgba(56,189,248,0.04); }

.please-dut-card__sn { font-weight: 600; color: #c8d8e8; }
.please-dut-card__sn code { font-size: 0.9rem; }
.please-dut-card__rev { font-size: 0.8rem; color: #6b8099; background: #1b2736; border-radius: 4px; padding: 2px 6px; }
.please-dut-card__runs { font-size: 0.8rem; margin-left: auto; }
.please-dut-card__chevron { font-size: 0.75rem; color: #6b8099; }

.please-dut-card__notes { padding: 0 1rem 0.5rem; font-size: 0.85rem; color: #8fa8be; }

.please-dut-card .please-table-wrap { border-top: 1px solid #1b2736; }
.please-dut-card .please-table { border-radius: 0; }

.please-empty--inline { padding: 0.75rem 1rem; margin: 0; color: #6b8099; font-size: 0.85rem; }

.please-td--right { text-align: right; }

/* ── Cpk badges (global, reused from Statistics page) ────────────────────── */

/* ── Collapsible section panels ──────────────────────────────────────────── */

.please-collapsible { border: 1px solid #2c3e50; border-radius: 8px; overflow: hidden; }

.please-collapsible__header {
    width: 100%; display: flex; align-items: center; gap: 0.6rem;
    background: #0f1a25; border: none; cursor: pointer;
    padding: 0.65rem 1rem; text-align: left;
    transition: background 0.1s;
}
.please-collapsible__header:hover { background: rgba(56,189,248,0.05); }

.please-collapsible__chevron { color: #6b8099; font-size: 0.75rem; width: 0.9rem; flex-shrink: 0; }
.please-collapsible__title   { font-weight: 600; color: #c8d8e8; font-size: 0.9rem; }
.please-collapsible__meta    { margin-left: auto; color: #6b8099; font-size: 0.8rem; }

.please-loading--inline { padding: 0.75rem 1rem; color: #6b8099; font-size: 0.85rem; }

.please-filter-label {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.82rem; color: #8fa8be; white-space: nowrap;
}
.please-filter-input--narrow { width: 5rem !important; }

.cpk-badge {
    display: inline-block; padding: 2px 10px; border-radius: 12px;
    font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums;
}
.cpk-bad      { background: rgba(248,113,113,0.15); color: #f87171; }
.cpk-marginal { background: rgba(251,191, 36,0.12); color: #fbbf24; }
.cpk-good     { background: rgba( 52,211,153,0.12); color: #34d399; }
.cpk-unknown  { background: rgba(143,168,190,0.12); color: #8fa8be; }

/* ── Light theme: DUTs, collapsible panels, tag filters, Cpk badges ─────── */
html[data-theme="light"] .please-maestro-filters h3 { color: #1a2535; }
html[data-theme="light"] .please-tag-filter-chip { background: rgba(2,132,199,0.07); border-color: rgba(2,132,199,0.25); color: #4a6278; }
html[data-theme="light"] .please-tag-filter-chip code { color: #0369a1; }
html[data-theme="light"] .please-tag-filter-chip__remove { color: #7a9ab0; }
html[data-theme="light"] .please-tag-filter-chip__remove:hover { color: #b91c1c; }
html[data-theme="light"] .please-btn--primary { color: #0284c7; border-color: rgba(2,132,199,0.4); }
html[data-theme="light"] .please-btn--primary:hover:not([disabled]) { background: rgba(2,132,199,0.08); border-color: #0284c7; }
html[data-theme="light"] .please-filter-label { color: #4a6278; }
html[data-theme="light"] .please-loading--inline { color: #7a9ab0; }
html[data-theme="light"] .please-empty--inline { color: #7a9ab0; }

html[data-theme="light"] .please-dut-card { background: #ffffff; border-color: #d1dce8; }
html[data-theme="light"] .please-dut-card--expanded { border-color: rgba(2,132,199,0.4); }
html[data-theme="light"] .please-dut-card__header:hover { background: rgba(2,132,199,0.04); }
html[data-theme="light"] .please-dut-card__sn { color: #1a2535; }
html[data-theme="light"] .please-dut-card__rev { color: #4a6278; background: #f0f4f8; }
html[data-theme="light"] .please-dut-card__chevron { color: #7a9ab0; }
html[data-theme="light"] .please-dut-card__notes { color: #4a6278; }
html[data-theme="light"] .please-dut-card .please-table-wrap { border-top-color: #e8eef4; }

html[data-theme="light"] .please-collapsible { border-color: #d1dce8; }
html[data-theme="light"] .please-collapsible__header { background: #f0f4f8; }
html[data-theme="light"] .please-collapsible__header:hover { background: rgba(2,132,199,0.06); }
html[data-theme="light"] .please-collapsible__chevron { color: #7a9ab0; }
html[data-theme="light"] .please-collapsible__title { color: #1a2535; }
html[data-theme="light"] .please-collapsible__meta { color: #7a9ab0; }

html[data-theme="light"] .cpk-bad      { background: rgba(185, 28, 28,0.08); color: #b91c1c; }
html[data-theme="light"] .cpk-marginal { background: rgba(180, 83,  9,0.08); color: #b45309; }
html[data-theme="light"] .cpk-good     { background: rgba( 22,163, 74,0.08); color: #15803d; }
html[data-theme="light"] .cpk-unknown  { background: rgba( 71, 85,105,0.08); color: #475569; }
