@property --phase-morph-width { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --phase-morph-height { syntax: '<length>'; inherits: false; initial-value: 0px; }
.phase-row {
  position: absolute; top: var(--item-top); left: var(--item-left); width: var(--item-width); height: var(--item-height);
  --phase-ink: oklch(from var(--track) .36 min(.055, calc(c * .4)) h);
  z-index: 2; cursor: grab; touch-action: none;
  transition: top 220ms var(--ease), height 220ms var(--ease);
}
.phase-row:focus-visible { outline: 2px solid #8c9099; outline-offset: 3px; border-radius: 999px; }
.phase-row:is(.moving,.reordering) { z-index: 8; cursor: grabbing; transition: none; }
.phase-card,.phase-mini {
  --phase-rest: oklch(from var(--track) calc(.982 - .112 * var(--phase-tone)) min(calc(.08 * var(--phase-tone)), calc(c * .65 * var(--phase-tone))) h);
  --phase-full: oklch(from var(--track) calc(.965 - .185 * var(--phase-tone)) min(calc(.12 * var(--phase-tone)), calc(c * .9 * var(--phase-tone))) h);
}
.phase-backdrop { position: absolute; inset: 0; background: #edf0f2; border-radius: 15px; pointer-events: none; }
.gantt-item.phase-card {
  top: 0; left: calc(var(--phase-start) + 2px); width: calc(var(--phase-width) - 4px + var(--phase-morph-width)); height: calc(100% + var(--phase-morph-height));
  border: 0; border-radius: 15px; background: var(--phase-rest); color: var(--phase-ink); box-shadow: none;
  transition: border-radius 220ms var(--ease); isolation: isolate;
}
.gantt-item.phase-card:is(:hover,:focus-within) { border: 0; box-shadow: none; }
.phase-fill { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; background: linear-gradient(to top, var(--phase-full) var(--phase-progress), transparent var(--phase-progress)); }
.phase-topbar { height: 30px; display: flex; align-items: center; gap: 5px; padding: 0 7px; overflow: hidden; border-radius: 15px; }
.phase-heading { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.phase-title { display: block; flex: 1; min-width: 0; width: 100%; height: 24px; padding: 0 2px; background: transparent; border: 0; border-radius: 5px; color: var(--phase-ink); font-size: 13px; line-height: 24px; font-weight: 550; text-overflow: ellipsis; }
.phase-heading > .phase-title { field-sizing: content; flex: 0 1 auto; width: auto; min-width: 2em; max-width: 100%; }
.phase-heading:has(.phase-ancestry) .phase-title { field-sizing: content; flex: 0 1 auto; width: auto; max-width: 72%; min-width: 2em; }
.phase-title::placeholder { color: color-mix(in srgb, var(--phase-ink) 55%, transparent); font-weight: 400; }
.phase-title:focus { background: #ffffff70; outline: none; }
.phase-ancestry { min-width: 0; flex: 1; color: #737880; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase-topbar .fold-toggle { flex: 0 0 18px; height: 24px; color: var(--phase-ink); border-radius: 50%; }
.phase-range { flex-shrink: 0; color: var(--phase-ink); opacity: .62; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.phase-delete,.phase-add { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 24px; padding: 0; border-radius: 50%; color: var(--phase-ink); }
.phase-delete svg,.phase-add svg { width: 13px; height: 13px; }
.phase-delete { opacity: .42; }
.phase-delete:hover { color: #9f424e; background: #ffffff70; opacity: 1; }
.phase-add:hover { background: #ffffff90; }
.phase-check { position: relative; display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 26px; color: var(--phase-ink); cursor: pointer; }
.phase-check input { position: absolute; inset: 0; appearance: none; width: 100%; height: 100%; margin: 0; border: 0; background: transparent; cursor: pointer; border-radius: 50%; }
.phase-check svg { width: 18px; height: 18px; stroke-width: 1.3; pointer-events: none; opacity: .62; }
.phase-check :is(.check-mark,.check-partial) { display: none; }
.phase-check input:checked + svg .check-mark, .phase-check input:indeterminate + svg .check-partial { display: block; }
.phase-check input:checked + svg { opacity: .9; }
.phase-check input:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.phase-hours { display: flex; align-items: center; flex: 0 0 auto; gap: 3px; height: 22px; padding: 0 4px; border-radius: 6px; color: var(--phase-ink); font-size: 11px; font-variant-numeric: tabular-nums; transition: background-color 120ms; }
.phase-hours > svg { width: 12px; height: 12px; opacity: .55; }
.phase-hours > span { opacity: .6; }
.phase-hours:has(input:placeholder-shown) > span { display: none; }
.phase-hours:not(.is-derived):hover { background: #ffffff50; }
.phase-hours:not(.is-derived):focus-within { background: #ffffffa8; box-shadow: 0 0 0 1px #ffffffb0; }
.phase-hours input { appearance: textfield; min-width: 2ch; max-width: 7ch; height: 22px; padding: 0; text-align: right; background: transparent; border: 0; border-radius: 4px; color: inherit; font: inherit; }
.phase-hours input::placeholder { color: inherit; opacity: .6; }
.phase-hours input::-webkit-inner-spin-button,.phase-hours input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.phase-hours input:focus { background: transparent; outline: none; }
.phase-hours.is-derived input { cursor: default; }
.phase-body { position: absolute; top: 30px; left: 0; right: 0; height: 28px; opacity: 1; visibility: visible; transition: opacity 160ms var(--ease) 60ms, visibility 0s; }
.phase-card.is-collapsed .phase-body { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 80ms, visibility 0s; }
.phase-children { position: absolute; top: 0; bottom: 2px; left: 12px; right: 36px; }
.phase-body > .phase-add { position: absolute; right: 8px; top: 0; }
.phase-mini { position: absolute; top: 0; left: calc(var(--phase-start) + 2px); width: calc(var(--phase-width) - 4px + var(--phase-morph-width)); height: calc(26px + var(--phase-morph-height)); display: flex; align-items: center; gap: 2px; padding: 0 5px; border-radius: 13px; background: var(--phase-rest); isolation: isolate; container-type: inline-size; overflow: hidden; }
.phase-mini .phase-title { font-size: 12px; font-weight: 450; }
.phase-mini { padding: 0; }
.phase-mini > .phase-title { padding-left: 5px; }
.phase-mini > .phase-delete { margin-right: 4px; }
.phase-mini .phase-delete { width: 18px; flex-basis: 18px; height: 22px; opacity: 0; pointer-events: none; transition: opacity 120ms; }
.phase-mini:is(:hover,:focus-within) > .phase-delete { opacity: .65; pointer-events: auto; }
.phase-mini > .phase-delete:hover { opacity: 1; }
.phase-mini .phase-check { width: 22px; flex-basis: 22px; height: 24px; }
.phase-card.is-done > .phase-topbar .phase-title,.phase-mini.is-done > .phase-title { color: #737982; text-decoration: line-through; text-decoration-thickness: 1px; }
.phase-boundary { z-index: 6; }
.phase-boundary.is-inline { right: auto; }
.phase-boundary span { position: absolute; width: 2px; top: 8px; bottom: 8px; left: 5px; background: #4f596080; border-radius: 2px; opacity: 0; transition: opacity 100ms; }
.phase-boundary:is(:hover,:focus-visible) span { opacity: 1; }
.phase-row > .resize-handle::after { content: ''; position: absolute; width: 2px; left: 5px; top: 10px; bottom: 10px; background: #4f596080; border-radius: 2px; opacity: 0; }
.phase-row > .resize-handle:is(:hover,:focus-visible)::after { opacity: 1; }
.phase-adjusting :is(.phase-row,.phase-card,.track-row,.track-head) { transition: none; }
.phase-ghost { position: absolute; pointer-events: none; z-index: 4; }
.phase-exit { position: absolute; pointer-events: none; z-index: 5; overflow: hidden; }
.axis-divider { position: absolute; top: 0; bottom: 0; width: 1px; background: #00000006; }
.ruler-compact { display: none; }
@container (max-width: 110px) {
  .time-label:has(.ruler-compact) .ruler-label { display: none; }
  .ruler-compact { display: inline; }
}
.gantt-item.idea-card,.gantt-item.idea-card:is(:hover,:focus-within) { border: 0; border-radius: 999px; box-shadow: none; }
.idea-title { line-height: 28px; padding-left: 13px; }
.idea-open-icon { top: 8px; right: 11px; }
@container (max-width: 280px) { .phase-topbar .phase-range,.phase-ancestry { display: none; } }
@container (max-width: 190px) { .phase-mini > .phase-hours { display: none; } .phase-topbar { gap: 2px; padding: 0 4px; } }
@container (max-width: 140px) { .phase-topbar > .phase-hours { display: none; } }
@container (max-width: 95px) { .phase-topbar > .phase-delete,.phase-topbar > .phase-check,.phase-mini > .phase-check { display: none; } }
@media (max-width: 600px) { .phase-title,.phase-mini .phase-title { font-size: 16px; } .phase-hours input:focus { font-size: 16px; } }
@media (pointer: coarse) { .add-cell { opacity: .55; } .phase-mini > .phase-delete { opacity: .55; pointer-events: auto; } .phase-boundary { width: 18px; transform: translateX(-3px); } }
