/* Calendar plan inherits Construction tokens, controls and navigation. */
.gp-view { max-width: 1480px; margin: 0 auto; min-width: 0; }
.gp-view .panel-title h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.025em; }
.gp-summary { padding: 16px; margin-bottom: 12px; background: var(--paper-2); border: 1px solid var(--line); border-left: 4px solid var(--blue); }
.gp-summary .section-heading { align-items: center; }
.gp-summary h4 { font-size: 16px; }
.gp-summary-dates, .gp-date-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gp-summary-dates { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.gp-summary-dates > div, .gp-date-summary > div { display: grid; align-content: start; gap: 6px; }
.gp-summary-dates span, .gp-date-summary span { color: var(--ink-3); font-size: 10px; }
.gp-summary-dates strong, .gp-date-summary strong { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gp-muted, .gp-uuid { color: var(--ink-3); font-size: 11px; line-height: 1.5; }
.gp-uuid { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.gp-message { padding: 24px 16px; background: var(--paper-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.gp-message h4 { margin: 0 0 8px; font-size: 16px; }
.gp-message p { margin: 0 0 12px; }
.gp-message p:last-child { margin-bottom: 0; }
.gp-message.error, .gp-view .form-message.error { color: var(--red); border-color: var(--red); }
.gp-toolbar { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(2, minmax(128px, 1fr)) minmax(100px, .8fr) auto; align-items: end; gap: 12px; padding: 16px; background: var(--paper-2); border: 1px solid var(--line); }
.gp-toolbar label, .gp-editor-form > label, .gp-date-fields label { display: grid; gap: 6px; color: var(--ink-3); font-size: 11px; font-weight: 500; }
.gp-toolbar input, .gp-toolbar select { min-height: 40px; font-size: 12px; }
.gp-object-period { grid-template-columns: repeat(3, minmax(120px, 1fr)) auto; margin: 12px 0; }
.gp-object-period .form-message { grid-column: 1 / -1; margin: 0; }
.gp-object-choices { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 16px 0 8px; padding: 12px 16px; border: 1px solid var(--line); background: var(--paper-2); }
.gp-object-choices legend { padding: 0 6px; font-size: 12px; font-weight: 600; }
.gp-choice-actions { display: flex; gap: 16px; align-items: center; }
.gp-choice-note { flex: 1 0 100%; margin: 0; }
.gp-object-choice-list { display: flex; flex-wrap: wrap; align-content: start; gap: 8px 16px; flex: 1 0 100%; min-width: 0; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-top: 1px solid var(--line); }
.gp-object-choice-list:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.gp-object-choice, .gp-check-label { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 12px; line-height: 1.4; cursor: pointer; }
.gp-object-choice input, .gp-check-label input { flex: 0 0 auto; width: 16px; min-height: 16px; height: 16px; accent-color: var(--blue); }
.gp-object-choice span { overflow-wrap: anywhere; }
.gp-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0 12px; }
.gp-actions > .gp-muted { margin-left: auto; }
.gp-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 12px 0; color: var(--ink-3); font-size: 11px; }
.gp-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.gp-legend i { display: inline-block; width: 20px; height: 6px; background: var(--blue); }
.gp-legend .actual i { background: var(--green); }
.gp-legend .forecast i { height: 0; border-top: 2px dashed var(--red); background: transparent; }
.gp-legend .today i { width: 2px; height: 14px; background: var(--red); }
.gp-legend small { flex: 1 0 100%; font-size: 10px; line-height: 1.4; }
.gp-plan { min-width: 0; padding: 16px; background: var(--paper-2); border: 1px solid var(--line); }
.gp-plans { display: grid; gap: 24px; }
.gp-plan h3 { font-size: 20px; }
.gp-warning-details { margin: 4px 0 12px; border: 1px solid var(--line); background: var(--paper-2); }
.gp-warning-details > summary, .gp-legacy > summary, .gp-sources > summary { padding: 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.gp-warning-details > p, .gp-warning-details > .gp-muted { padding: 0 12px 12px; margin: 0; }
.gp-alerts { display: grid; gap: 8px; margin: 0; padding: 0 16px 12px 32px; list-style: square; font-size: 11px; line-height: 1.5; color: var(--yellow); }
.gp-alerts li.overdue { color: var(--red); }
.gp-summary > .gp-alerts { padding-bottom: 0; padding-left: 16px; }
.gp-mini-calendar { margin: 12px 0; overflow: hidden; border: 1px solid var(--line); }
.gp-mini-scale { display: grid; grid-template-columns: minmax(120px, 1.5fr) repeat(7, 1fr); font-size: 9px; line-height: 1.5; background: var(--blue-soft); }
.gp-mini-scale > * { padding: 8px 4px; text-align: center; }
.gp-mini-scale > span { text-align: left; padding-left: 12px; }
.gp-mini-scale .today { color: var(--red); font-weight: 600; }
.gp-mini-row { display: grid; grid-template-columns: minmax(120px, 1.5fr) 7fr; border-top: 1px solid var(--line); }
.gp-mini-row > span { align-self: center; padding: 8px 12px; font-size: 10px; line-height: 1.4; }
.gp-mini-row .gp-chart { min-height: 52px; grid-template-rows: repeat(3, 12px); }
.gp-mini-row .gp-lane { min-height: 12px; }
.gp-mini-row .gp-bar { top: 3px; height: 5px; }
.gp-mini-row .gp-bar-label { display: none; }
.gp-mini-row .gp-undated { top: 20px; font-size: 9px; }
.gp-timeline-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line-dark); background: var(--paper-2); scrollbar-gutter: stable; }
.gp-timeline-wrap:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.gp-timeline { min-width: 820px; font-variant-numeric: tabular-nums; }
.gp-timeline-head, .gp-stage-summary { display: grid; grid-template-columns: 260px minmax(560px, 1fr); }
.gp-timeline-head { position: sticky; top: 0; z-index: 3; min-height: 40px; background: var(--blue-soft); border-bottom: 1px solid var(--line-dark); }
.gp-row-label { padding: 12px; border-right: 1px solid var(--line); }
.gp-timeline-head > .gp-row-label { font-size: 11px; font-weight: 600; }
.gp-timeline-head > .gp-row-label { position: sticky; left: 0; z-index: 4; background: var(--blue-soft); }
.gp-scale { display: flex; min-width: 0; align-items: stretch; }
.gp-scale span { display: grid; flex: 0 0 auto; align-content: center; padding: 8px 4px; text-align: center; border-right: 1px solid var(--line); font-size: 10px; color: var(--ink-3); }
.gp-stage { border-bottom: 1px solid var(--line); }
.gp-stage:last-child { border-bottom: 0; }
.gp-stage-summary { position: relative; min-height: 78px; list-style: none; cursor: pointer; }
.gp-stage-summary::-webkit-details-marker { display: none; }
.gp-stage-summary > .gp-row-label { position: sticky; left: 0; z-index: 3; display: grid; align-content: center; gap: 6px; padding-left: 28px; background: var(--paper-2); }
.gp-stage-summary > .gp-row-label::before { content: "›"; position: absolute; left: 12px; top: 29px; color: var(--ink-3); font-size: 17px; }
.gp-stage[open] > .gp-stage-summary > .gp-row-label::before { transform: rotate(90deg); }
.gp-stage-summary strong { font-size: 12px; font-weight: 600; line-height: 1.4; }
.gp-stage-summary small { color: var(--ink-3); font-size: 10px; line-height: 1.4; }
.gp-stage-summary:hover { background: var(--blue-soft); }
.gp-stage-summary:hover > .gp-row-label { background: var(--blue-soft); }
.gp-stage-summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.gp-stage.depth-1 > .gp-stage-summary > .gp-row-label { padding-left: 44px; }
.gp-stage.depth-1 > .gp-stage-summary > .gp-row-label::before { left: 28px; }
.gp-stage.depth-2 > .gp-stage-summary > .gp-row-label { padding-left: 56px; }
.gp-stage.depth-2 > .gp-stage-summary > .gp-row-label::before { left: 40px; }
.gp-stage.depth-1 .gp-stage-summary strong, .gp-stage.depth-2 .gp-stage-summary strong { font-weight: 400; }
.gp-chart { position: relative; display: grid; grid-template-rows: repeat(3, 20px); align-content: center; min-height: 76px; min-width: 0; padding: 8px 0; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(var(--gp-day, 2.38095%) - 1px), var(--line) calc(var(--gp-day, 2.38095%) - 1px), var(--line) var(--gp-day, 2.38095%)); }
.gp-lane { position: relative; min-height: 20px; }
.gp-bar { position: absolute; z-index: 1; display: block; min-width: 4px; height: 7px; top: 6px; background: var(--blue); border-radius: 1px; }
.gp-bar.actual { background: var(--green); }
.gp-bar.forecast { height: 9px; top: 5px; background: transparent; border: 1px dashed var(--red); }
.gp-bar.marker { width: 5px !important; height: 11px; top: 4px; }
.gp-bar.open-fact { background: var(--paper-2); border: 2px solid var(--green); }
.gp-bar.forecast.marker { width: 9px !important; transform: rotate(45deg); }
.gp-bar-label { position: absolute; left: 12px; top: -3px; white-space: nowrap; color: var(--ink-3); font-size: 9px; line-height: 16px; background: var(--paper-2); padding: 0 3px; }
.gp-bar.forecast.marker .gp-bar-label { transform: rotate(-45deg); transform-origin: left center; }
.gp-today-line { position: absolute; z-index: 2; width: 1px; top: 0; bottom: 0; background: var(--red); pointer-events: none; }
.gp-undated { position: absolute; top: 30px; left: 12px; color: var(--ink-3); background: var(--paper-2); font-size: 10px; }
.gp-stage-body { padding: 16px; background: var(--paper); border-top: 1px solid var(--line); }
.gp-date-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gp-open-note { padding: 8px 12px; margin: 12px 0; border-left: 3px solid var(--green); color: var(--ink-3); background: var(--green-soft); font-size: 11px; line-height: 1.5; }
.gp-item-rows { display: grid; gap: 8px; margin-top: 8px; }
.gp-item-row { background: var(--paper-2); border: 1px solid var(--line); }
.gp-item-row > summary { display: grid; gap: 8px; padding: 12px; cursor: pointer; font-size: 12px; }
.gp-item-row summary span { color: var(--ink-3); font-size: 11px; }
.gp-item-row > p { margin: 8px 12px; }
.gp-item-row .gp-chart { margin: 8px 12px; }
.gp-sources, .gp-legacy { margin-top: 12px; border: 1px solid var(--line); background: var(--paper-2); }
.gp-source-list { display: grid; gap: 8px; padding: 0 12px 12px; }
.gp-source { padding: 12px; border-left: 2px solid var(--line-dark); background: var(--paper); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.gp-source strong { font-size: 12px; font-weight: 600; }
.gp-source > summary { font-weight: 600; cursor: pointer; }
.gp-source-item { padding: 12px; border: 1px solid var(--line); }
.gp-source-item > summary { font-size: 12px; font-weight: 600; cursor: pointer; }
.gp-source-item > .gp-source { margin-top: 8px; }
.gp-source p { margin: 6px 0 0; }
.gp-operation-source { padding-left: 12px; border-left: 1px solid var(--line-dark); font-variant-numeric: tabular-nums; }
.gp-operation-source.excluded { color: var(--ink-3); border-left-style: dashed; }
.gp-dialog { width: min(980px, calc(100% - 32px)); max-height: calc(100vh - 32px); }
.gp-editor-form { display: grid; gap: 16px; padding: 0 24px 24px; }
.gp-form-section { padding-top: 12px; border-top: 1px solid var(--line); }
.gp-form-section h4 { margin: 0 0 12px; font-size: 14px; }
.gp-date-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gp-date-fields textarea { min-height: 42px; }
.gp-date-fields input:disabled { color: var(--ink-3); background: var(--paper); cursor: default; }
.gp-editor-item { border: 1px solid var(--line); margin: 8px 0; padding: 0 12px 12px; background: var(--paper-2); }
.gp-editor-item summary { padding: 12px 0; cursor: pointer; font-size: 12px; font-weight: 600; }
.gp-editor-item .gp-check-label { margin: 8px 0; }
.gp-bindings { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 8px 12px; margin: 8px 0; border: 1px solid var(--line); }
.gp-bindings legend { max-width: 100%; padding: 0 4px; font-size: 11px; overflow-wrap: anywhere; }
.gp-form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.gp-form-footer .form-message { flex: 1 0 100%; margin: 0; }
.gp-history { padding: 0 24px 24px; }
.gp-history-event { border: 1px solid var(--line); margin: 8px 0; }
.gp-history-event summary { display: grid; gap: 6px; padding: 12px; font-size: 12px; cursor: pointer; }
.gp-history-event summary span { color: var(--ink-3); font-size: 11px; }
.gp-history-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 12px 12px; }
.gp-history-diff h4 { font-size: 12px; margin: 8px 0; }
.gp-history-diff pre { max-height: 420px; padding: 12px; margin: 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--body); font-size: 10px; line-height: 1.5; color: var(--ink-3); background: var(--paper); }
.gp-view button:focus-visible, .gp-summary button:focus-visible, .gp-dialog button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.gp-view button:disabled, .gp-dialog button:disabled { opacity: .55; cursor: default; }
.gp-view button:active:not(:disabled), .gp-dialog button:active:not(:disabled) { transform: scale(.98); }
@media (max-width: 1200px) {
  .gp-toolbar { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
  .gp-toolbar > label:first-child { grid-column: 1 / -1; }
  .gp-toolbar > button { justify-self: start; }
  .gp-object-period { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
  .gp-object-period > label:first-child { grid-column: auto; }
}
@media (max-width: 650px) {
  .gp-summary { padding: 12px; }
  .gp-summary .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .gp-summary-dates { grid-template-columns: 1fr; gap: 12px; }
  .gp-summary-dates > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
  .gp-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .gp-toolbar > label:first-child { grid-column: 1 / -1; }
  .gp-toolbar input, .gp-toolbar select, .gp-toolbar button { min-height: 44px; }
  .gp-object-period > label:first-child { grid-column: auto; }
  .gp-view .panel-title { align-items: start; padding: 16px; }
  .gp-plan { padding: 12px; }
  .gp-object-choices { padding: 8px 12px; }
  .gp-object-choice { width: 100%; min-height: 44px; }
  .gp-choice-actions { flex: 1 0 100%; flex-wrap: wrap; }
  .gp-choice-actions button { min-height: 44px; }
  .gp-object-choice-list { max-height: min(30dvh, 240px); }
  .gp-actions > .gp-muted { margin-left: 0; flex: 1 0 100%; }
  .gp-actions button, .gp-summary button, .gp-dialog button:not(.icon-button) { min-height: 44px; }
  .gp-timeline-head, .gp-stage-summary { grid-template-columns: 180px minmax(560px, 1fr); }
  .gp-timeline { min-width: 740px; }
  .gp-row-label { max-width: 180px; }
  .gp-stage-body { padding: 12px; }
  .gp-date-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gp-dialog { width: calc(100% - 16px); max-width: none; max-height: calc(100dvh - 16px); padding: 0; }
  .gp-dialog .modal-head { padding: 16px; }
  .gp-dialog .modal-head h2 { font-size: 20px; }
  .gp-editor-form, .gp-history { padding: 0 16px 16px; }
  .gp-date-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gp-date-fields label:last-child { grid-column: 1 / -1; }
  .gp-bindings { display: grid; }
  .gp-history-diff { grid-template-columns: 1fr; }
  .gp-form-footer > button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .gp-view button, .gp-dialog button { transition: none; }
  .gp-view button:active:not(:disabled), .gp-dialog button:active:not(:disabled) { transform: none; }
}
