.topbar.timeline-header { align-items: flex-start; }
.timeline-header .brand.compact { flex-direction: column; align-items: flex-start; gap: 10px; }
.timeline-header .mark { flex: 0 0 auto; }
.timeline-header .back-link { margin: 0; min-height: 36px; color: var(--ink); }
.timeline-header .back-link:hover { text-decoration: underline; }
.pt-workspace-brand { display: flex; align-items: center; gap: 10px; min-height: 32px; font-weight: 650; overflow-wrap: anywhere; }
.pt-workspace-brand .brand-icon { width: 93px; height: 32px; object-fit: contain; }
.pt-workspace-brand > svg { flex: 0 0 24px; width: 24px; height: 24px; }

#projectTimeline { min-width: 0; }
#projectTimeline > .section-head { margin-bottom: 8px; }
.pt-heading-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pt-archive-link { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); text-decoration: none; }
.pt-archive-link:hover { color: var(--ink); background: var(--soft); }
.pt-archive-link svg { width: 20px; height: 20px; }
#timelineOptions { max-width: 1316px; min-width: 0; }
#timelineOptions > summary { display: list-item; width: fit-content; max-width: 100%; min-height: 36px; padding: 8px 4px; border-radius: 4px; color: var(--accent); font-size: 13px; font-weight: 650; line-height: 20px; cursor: pointer; overflow-wrap: anywhere; }
#timelineOptions > summary::marker { color: var(--accent); }
#timelineOptions > summary:hover { background: var(--soft); }
#projectTimeline :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.pt-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; max-width: 1316px; min-width: 0; }
.pt-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 12px; margin: 8px 0 0; max-width: 420px; min-width: 0; }
.pt-picker select { width: 100%; max-width: 100%; font-size: 13px; }
.pt-scale { display: flex; align-items: center; gap: 8px; font-size: 12px; min-width: 0; }
.pt-scale select { width: 115px; }
.pt-toolbar .actions { flex-wrap: wrap; min-width: 0; max-width: 100%; gap: 8px; }
.pt-from { display: flex; gap: 8px; align-items: center; font-size: 12px; min-width: 0; }
.pt-from input { width: 170px; max-width: 100%; }
.pt-range { display: block; margin: 4px 0 6px; color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
#timelineMessage:not(:empty) { margin: 6px 0; }
.pt-viewport { width: 100%; max-width: 1316px; overflow: auto; border-block: 1px solid var(--line); }
.pt-grid { display: grid; grid-template-columns: 260px var(--chart-width); grid-template-rows: 80px; grid-auto-rows: 136px; width: max-content; min-height: calc(var(--chart-height) + 80px); }
.pt-calendar { grid-column: 2; }
.pt-months { display: grid; grid-template-columns: repeat(var(--months), 1fr); height: 44px; }
.pt-months > span { position: relative; border-left: 1px solid #e8ebf1; display: flex; justify-content: flex-start; padding-top: 8px; flex-direction: column; padding-left: 8px; }
.pt-weeks { position: relative; height: 36px; border-top: 1px solid var(--line); }
.pt-week { position: absolute; top: 0; height: 36px; min-height: 0; min-width: 0; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-left: 1px dashed #aeb8c8; border-radius: 0; background: transparent; color: #1c1e40; font-size: 11px; font-weight: 500; white-space: nowrap; }
.pt-week:hover, .pt-week:focus-visible { background: #e8edf6; color: #1c1e40; z-index: 1; }
.pt-week:focus-visible { outline: 2px solid #1c1e40; outline-offset: -2px; }
.pt-week-tooltip { position: fixed; z-index: 55; display: grid; gap: 5px; width: max-content; max-width: calc(100vw - 16px); background: #1c1e40; color: white; border-radius: 4px; padding: 10px 12px; font-size: 12px; box-shadow: 0 4px 12px #1c1e4026; }
.pt-week-tooltip strong { font-size: 12px; }
.pt-corner, .pt-lane-label { position: sticky; left: 0; grid-column: 1; z-index: 3; background: white; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pt-corner { padding: 12px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; justify-content: space-between; }
.pt-corner small { font-size: 11px; }
.pt-lane-label { display: flex; align-items: center; padding: 8px 36px 8px 10px; min-width: 0; border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
.pt-lane-label dl { display: grid; width: 100%; min-width: 0; grid-template-columns: 57px minmax(0, 1fr); gap: 5px 7px; margin: 0; font-size: 12px; line-height: 1.4; }
.pt-lane-label dt { color: #657386; font-size: 10px; }
.pt-lane-label dd { margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-lane-label a { color: #1c1e40; text-decoration: none; font-weight: 700; }
.pt-lane-label a:hover { text-decoration: underline; }
.pt-lane-label button { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); padding: 4px; min-height: 28px; min-width: 28px; }
.pt-lane-label button svg { width: 15px; height: 15px; }
.pt-months strong { font-size: 12px; font-weight: 650; }
.pt-months small { color: var(--muted); font-size: 11px; }
.pt-canvas { grid-column: 2; position: relative; height: var(--chart-height); }
.pt-week-lines { position: absolute; inset: 0; pointer-events: none; }
.pt-week-lines > i { position: absolute; top: 0; bottom: 0; border-left: 1px dashed #b9c1ce; }
.pt-lane { position: absolute; top: calc(var(--lane-index) * 136px); left: 0; width: 100%; height: 136px; }
.pt-lane::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); border-top: 3px solid #8590a5; }
.pt-archify { position: absolute; inset: 0; pointer-events: none; }
.pt-archify > svg { width: 100%; height: var(--chart-height); overflow: visible; font-family: inherit; }
.pt-archify > svg > rect, .pt-archify .c-grid { display: none; }
.pt-archify [data-node-id] { cursor: pointer; pointer-events: auto; }
.pt-archify .c-mask { fill: #fff; stroke: none; }
.pt-archify rect.pt-hit-area { fill: transparent; stroke: none; pointer-events: all; }
.pt-archify [data-node-id] > rect:not(.c-mask) { fill: color-mix(in srgb, var(--phase) 8%, white); stroke: var(--phase); stroke-width: var(--pap-stroke, 6px); }
.pt-archify [data-node-id][data-planned="false"] > rect:not(.c-mask) { stroke-dasharray: 12 6; }
.pt-archify [data-node-id]:hover > rect:not(.c-mask), .pt-archify [data-node-id]:focus-visible > rect:not(.c-mask) { fill: color-mix(in srgb, var(--phase) 18%, white); stroke: #1c1e40; }
.pt-archify text { fill: #1c1e40; font-size: 12px; }
.pt-archify text[data-node-label] { font-size: 16px; font-weight: 700; }
.pt-archify text[data-detail="fine"] { font-size: 11px; }
.pt-archify .semantic-sigil { display: none; }
#overviewView [data-phase="Anstoss"] { --phase: #0077ac; }
#overviewView [data-phase="Grobkonzept"] { --phase: #009176; }
#overviewView [data-phase="Detailkonzept"] { --phase: #74367c; }
#overviewView [data-phase="Umsetzung"] { --phase: #f6a124; }
#overviewView [data-phase="Auswertung"] { --phase: #004a61; }
.pt-completion { position: absolute; top: 38px; z-index: 1; pointer-events: none; color: #1c1e40; }
.pt-completion.compact { top: 108px; }
.pt-completion svg { width: 18px; height: 18px; }
.pt-continuation { position: absolute; top: 104px; color: var(--phase); pointer-events: none; }
.pt-continuation.before { left: 0; }
.pt-continuation.after { right: 0; }
.pt-continuation svg { width: 18px; height: 18px; }
.pt-today { position: absolute; top: 0; bottom: 0; width: 1px; background: #bd285b; pointer-events: none; }
.pt-today > span { position: absolute; top: 0; left: 4px; font-size: 11px; color: #a32350; background: #fff; }
.pt-outside { position: absolute; top: 46px; z-index: 2; min-width: 44px; min-height: 44px; background: #fff; }
.pt-outside.before { left: 8px; }
.pt-outside.after { right: 8px; }
.pt-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin: 20px 0; font-size: 12px; color: var(--muted); }
.pt-legend span { display: inline-flex; align-items: center; gap: 8px; }
.pt-legend i { display: block; width: 12px; height: 12px; background: var(--phase); }
.pt-legend .pt-unplanned-key { width: 22px; border: 2px dashed #1c1e40; background: transparent; }
.pt-pages { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block: 20px; font-size: 12px; }
.pt-empty { padding: 40px 4px; color: var(--muted); }
.pt-dialog { max-width: 520px; }
.pt-dialog h3 { font-size: 18px; margin: 0 0 20px; overflow-wrap: anywhere; }
.pt-date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pt-check { display: flex; align-items: center; gap: 12px; }
.pt-check input { width: auto; }
.pt-peek { position: fixed; z-index: 50; width: min(360px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow-y: auto; border: 1px solid #bcc5d4; border-radius: 6px; background: white; padding: 16px; box-shadow: 0 8px 28px #1c1e4026; color: #1c1e40; }
.pt-peek-head { display: flex; align-items: flex-start; gap: 8px; }
.pt-peek h3 { font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; margin: 0; flex: 1; }
.pt-peek button.ghost { min-width: 36px; min-height: 36px; padding: 6px; }
.pt-peek svg { width: 18px; height: 18px; flex: 0 0 auto; }
.pt-peek-phase { display: flex; gap: 8px; align-items: center; margin-block: 12px 8px; font-size: 13px; }
.pt-peek-phase > i { width: 10px; height: 10px; flex: 0 0 auto; background: var(--phase); }
.pt-peek-phase small { display: block; margin-top: 3px; color: #526170; }
.pt-peek-dates { display: flex; gap: 8px; font-size: 12px; color: #526170; margin: 0 0 14px; }
.pt-peek section { border-top: 1px solid #dce1e9; padding-top: 12px; margin-top: 12px; }
.pt-peek h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; }
.pt-toolchain { display: grid; grid-template-columns: 1fr 14px 1fr 14px 1fr; gap: 4px; align-items: center; }
.pt-toolchain > svg { width: 14px; }
.pt-toolchain a { display: flex; align-items: center; flex-direction: column; gap: 6px; color: #1c1e40; text-decoration: none; text-align: center; font-size: 12px; overflow-wrap: anywhere; }
.pt-toolchain a:hover { text-decoration: underline; }
.pt-toolchain small { display: block; margin-top: 3px; color: #526170; font-size: 11px; }
.pt-peek-note { font-size: 12px; line-height: 1.5; color: #526170; margin: 10px 0 0; }
[data-brain-status="unknown"] { --brain: #728096; }
[data-brain-status="green"] { --brain: #16834a; }
[data-brain-status="yellow"] { --brain: #d9a409; }
[data-brain-status="red"] { --brain: #c93d43; }
.pt-brain-status { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.pt-brain-status > i, .pt-brain-key i { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--brain); flex-shrink: 0; }
.pt-brain-key { display: grid; gap: 7px; padding: 0; margin: 12px 0 0; list-style: none; font-size: 11px; color: #526170; }
.pt-brain-key li { display: flex; align-items: center; gap: 8px; }
.pt-peek-actions { border-top: 1px solid #dce1e9; display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 10px; gap: 8px; }
.pt-peek-actions .back-link { margin: 0; font-size: 13px; }
@media (max-width: 680px) {
  .pt-toolbar { display: block; }
  .pt-toolbar .actions { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 8px; align-items: center; }
  .pt-toolbar .pt-scale { grid-column: 1 / -1; }
  .pt-toolbar button { min-width: 42px; min-height: 42px; padding-inline: 6px; }
  .pt-from { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px; }
  .pt-from input { width: 100%; padding-inline: 6px; }
  #timelineToday { grid-column: 1; }
  #timelineRefresh { grid-column: 3; }
  .pt-range { margin: 2px 0 4px; font-size: 12px; }
  .pt-grid { grid-template-columns: 0 var(--chart-width); grid-auto-rows: 240px; min-height: calc(var(--mobile-chart-height) + 80px); }
  .pt-corner { display: none; }
  .pt-lane-label { grid-column: 2; width: calc(100vw - 32px); height: 104px; align-self: start; padding-top: 7px; padding-bottom: 7px; border-right: 0; }
  .pt-lane-label dl { gap: 3px 7px; line-height: 1.3; }
  .pt-lane-label dd:first-of-type { -webkit-line-clamp: 1; }
  .pt-canvas { height: var(--mobile-chart-height); }
  .pt-lane { top: calc(var(--lane-index) * 240px); height: 240px; }
  .pt-lane::before { top: calc(50% + 52px); }
  .pt-completion { top: 142px; }
  .pt-completion.compact { top: 212px; }
  .pt-continuation { top: 208px; }
  .pt-outside { top: 150px; }
  .pt-outside.after { right: auto; left: 8px; }
  .pt-date-fields { grid-template-columns: 1fr; }
  #projectTimeline > .section-head { align-items: center; flex-wrap: nowrap; gap: 8px; margin-bottom: 4px; }
  #projectTimeline h2 { min-width: 0; font-size: 20px; line-height: 1.2; }
  #projectTimeline #createPapButton { flex: 0 0 42px; width: 42px; min-height: 42px; padding: 10px; }
  #createPapButton .pt-create-label { display: none; }
}
/* Zeitplan (R2): the PAP-wide timeline is one closed section with a button-like summary; nothing is removed. */
.pt-plan { margin: 4px 0 20px; min-width: 0; }
.pt-plan > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; list-style: none; font-size: .92rem; color: var(--ink); max-width: 100%; overflow-wrap: anywhere; }
.pt-plan > summary::-webkit-details-marker { display: none; }
.pt-plan > summary::marker { content: ""; }
.pt-plan > summary svg { width: 16px; height: 16px; flex: 0 0 16px; }
.pt-plan > summary:hover { background: var(--soft); }
.pt-plan > summary:focus-visible { outline: 3px solid #005b96; outline-offset: 3px; }
.pt-plan[open] > summary { margin-bottom: 12px; }
.pt-plan-hint { color: var(--muted); font-size: .85rem; }
