/* Scoped visual summaries; retain each skin's existing controls and colors. */
.layout > #workspace {align-self:start;min-width:0}
/* The title and centered search share a toolbar, keeping both panels level below. */
.project-toolbar {display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,520px) minmax(100px,1fr);align-items:center;gap:18px}
.project-toolbar #projectListTitle {margin:0;justify-self:start}
.project-toolbar #search {width:100%;min-width:0;justify-self:center}
.project-toolbar #status {justify-self:end;white-space:nowrap}
.project-register-title {display:none}
html[data-skin="office"] .project-register-title {display:block}
html:not([data-skin="office"]) #projects > .project-card:first-child {margin-top:0}
@media(max-width:700px) {
  .project-toolbar {grid-template-columns:minmax(0,1fr) auto;gap:10px}
  .project-toolbar #projectListTitle {grid-column:1;grid-row:1}
  .project-toolbar #status {grid-column:2;grid-row:1}
  .project-toolbar #search {grid-column:1/-1;grid-row:2}
}
#workspace > .metrics {grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr))}
#financeMetrics {grid-template-columns:repeat(4,minmax(0,1fr))}
.insights {margin:18px 0;min-width:0;color:var(--text)}
.insights [hidden] {display:none!important}
.insights h2,.insights h3 {margin:0 0 8px}
.insights p {line-height:1.5}
.insights summary {cursor:pointer;font-weight:500;padding:12px 0;min-height:44px}
.insight-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.insight-heading p {margin:4px 0;color:var(--muted)}
.insight-heading label {margin:0;max-width:180px}
.insight-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:16px}
.insight-card {border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:18px;min-width:0}
.insight-card > p {color:var(--muted);font-size:13px;margin:6px 0 14px}
.insight-bars {display:grid;gap:8px}
.insights button {white-space:normal;overflow-wrap:anywhere;min-height:44px;max-width:100%}
.insight-bars .insight-bar {display:grid;grid-template-columns:1fr auto;gap:6px 10px;width:100%;border:1px solid transparent;background:transparent;color:var(--text);padding:8px;text-align:left;border-radius:8px;min-width:0}
.insight-bar-label {font-size:13px;font-weight:500}
.insight-bar strong {font-size:14px;font-variant-numeric:tabular-nums}
.insight-bar small {grid-column:1/-1;color:var(--muted);font-weight:400}
.insight-meter {grid-column:1/-1;display:block;background:var(--bg);border:1px solid var(--line);border-radius:4px;height:12px;overflow:hidden}
.insight-meter {width:100%}.insight-meter rect {fill:var(--accent)}
.insight-bar[data-insight-key="90+"] .insight-meter rect,.insight-bar[data-insight-key="RED"] .insight-meter rect {fill:#d66c5e}
.insight-bar[data-insight-key="31-60"] .insight-meter rect,.insight-bar[data-insight-key="61-90"] .insight-meter rect,.insight-bar[data-insight-key="AMBER"] .insight-meter rect {fill:#bb8626}
.insight-bar[data-insight-key="undated"] .insight-meter rect {fill:#8191a5}
.insight-bar:hover,.insight-bar[aria-pressed="true"] {border-color:var(--accent);background:var(--bg)}
.insights :is(button,a,summary):focus-visible {outline:3px solid var(--accent);outline-offset:3px}
.insight-detail {margin-top:16px;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:10px;padding:18px;background:var(--bg);min-width:0;overflow-wrap:anywhere}
.insight-detail:focus {outline:2px solid var(--accent);outline-offset:2px}
.insight-detail dl {display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}
.insight-detail dt {font-size:12px;color:var(--muted)}
.insight-detail dd {margin:4px 0;font-weight:500}
.insight-record {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-top:1px solid var(--line)}
.insight-record small {display:block;color:var(--muted);margin-top:4px}
.insight-record > * {min-width:0}
.insight-record > strong {flex-shrink:0}
.insight-footer {display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:16px}
.insight-empty {padding:18px 0;color:var(--muted)}
.report-table progress {width:100%;height:8px;accent-color:var(--accent)}
.portfolio-resume .resume-work {min-height:0;padding:0 0 20px;border-bottom:1px solid var(--line);margin-bottom:20px}
.project-timeline {border-bottom:1px solid var(--line);padding-bottom:20px}
.timeline-strip {display:flex;gap:0;overflow-x:auto;padding:12px 4px 16px;scroll-snap-type:x proximity}
.timeline-step {position:relative;flex:1 0 150px;min-width:0;max-width:none;scroll-snap-align:start}
.timeline-step:not(:last-child)::after {content:"";position:absolute;top:29px;left:50%;width:100%;height:3px;background:var(--line);pointer-events:none}
.timeline-step button {position:relative;z-index:1;display:flex;align-items:center;flex-direction:column;gap:9px;text-align:center;width:100%;height:100%;padding:4px 10px 12px;background:transparent;color:var(--text);border:1px solid transparent;border-radius:8px}
.timeline-step button:hover,.timeline-step button[aria-pressed="true"] {border-color:var(--accent)}
.timeline-dot {display:grid;place-items:center;width:32px;height:32px;margin:8px;background:var(--panel);border:2px solid var(--muted);border-radius:50%;font-size:16px;font-weight:bold}
.timeline-step.is-current .timeline-dot {width:44px;height:44px;margin:2px;border-width:3px;border-color:var(--accent);box-shadow:0 0 0 3px var(--bg)}
.timeline-step.complete .timeline-dot {background:var(--accent);border-color:var(--accent);color:var(--bg)}
.timeline-step.late .timeline-dot {border-color:#d66c5e;color:#d66c5e}
.timeline-step.blocked .timeline-dot {border-style:dashed}
.timeline-step small {font-size:12px;font-weight:400;color:var(--muted)}
.timeline-stage {font-size:11px;color:var(--accent);min-height:16px;font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.timeline-calendar {display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:12px;border-top:1px solid var(--line);padding-top:12px}
.timeline-legend {color:var(--muted);font-size:12px;line-height:1.6}
@media(max-width:600px) {
  #financeMetrics {grid-template-columns:repeat(2,minmax(0,1fr))}
  .insight-card,.insight-detail {padding:14px}
  .insight-record {flex-wrap:wrap;gap:8px}
  .insight-bars .insight-bar {grid-template-columns:1fr}
  .timeline-strip {display:block;max-height:460px;overflow-y:auto;overflow-x:hidden;padding:6px}
  .timeline-step {max-width:none;min-width:0}
  .timeline-step:not(:last-child)::after {top:38px;left:26px;width:3px;height:100%}
  .timeline-step button {display:grid;grid-template-columns:48px 1fr;text-align:left;align-items:center;gap:4px 10px;padding:6px 4px 16px}
  .timeline-dot {grid-row:1/5;grid-column:1}
  .timeline-step button > :not(.timeline-dot) {grid-column:2}
  .timeline-stage {min-height:0}
}
@media(prefers-reduced-motion:reduce) {.insights * {scroll-behavior:auto!important;transition:none!important}}
@media print {.insights button {break-inside:avoid}.insight-footer {display:none}.timeline-strip {overflow:visible;flex-wrap:wrap}}
