/* Portfolio skeleton. Phone layout first. Desktop uses the full main column. */
.pf-root {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: #0f172a;
}
.pf-head { display: flex; flex-direction: column; gap: 0.55rem; }
.pf-title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.7rem; }
.pf-title-row h2 { margin: 0; font-size: 1.35rem; }
.pf-kicker {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: #fef3c7; color: #92400e; border-radius: 999px; padding: 0.1rem 0.45rem;
}
.pf-lead { margin: 0; font-size: 0.85rem; color: #475569; line-height: 1.4; }
.pf-banner {
  font-size: 0.8rem; line-height: 1.35; border-radius: 0.6rem; padding: 0.5rem 0.7rem;
  background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa;
}
.pf-banner.pf-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.pf-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pf-tabs button, .pf-zoom button, .pf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e2e8f0; background: #fff; color: #334155; border-radius: 999px;
  min-height: 2.5rem; padding: 0.35rem 0.75rem; font-size: 0.8rem; font-weight: 600;
}
.pf-tabs button[aria-selected="true"], .pf-zoom button[aria-pressed="true"] {
  background: #0f766e; color: #fff; border-color: #0f766e;
}
.pf-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.pf-tools input[type="search"], .pf-tools input[type="date"], .pf-field input, .pf-field select, .pf-field textarea {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 0.6rem; padding: 0.45rem 0.6rem; font-size: 0.95rem;
  background: #fff;
}
.pf-tools input[type="search"] { flex: 1 1 12rem; }
.pf-check { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: #475569; }
.pf-list { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.pf-job, .pf-up {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 0.8rem; background: #fff; padding: 0.7rem 0.75rem;
}
.pf-job.overdue, .pf-up.overdue { border-color: #fecaca; background: #fff7f7; }
.pf-job.finished, .pf-job.settled { opacity: 0.62; background: #f8fafc; }
.pf-job.settled .pf-job-id, .pf-job.settled .pf-job-title { color: #64748b; }
.pf-groups { display: flex; flex-direction: column; gap: 0.55rem; width: 100%; }
.pf-group { border: 1px solid #e2e8f0; border-radius: 0.8rem; background: #fff; overflow: hidden; }
.pf-group-head {
  width: 100%; min-height: 2.75rem; display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem; padding: 0.6rem 0.75rem; border: 0; background: #f8fafc; color: #0f172a;
  text-align: left; font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer;
}
.pf-group-name { min-width: 0; }
.pf-group-meta { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.75rem; font-weight: 600; color: #64748b; white-space: nowrap; }
.pf-chev {
  width: 0.45rem; height: 0.45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin-top: -0.15rem; flex: 0 0 auto;
}
.pf-group-head[aria-expanded="false"] .pf-chev { transform: rotate(-45deg); margin-top: 0.15rem; }
.pf-group-body { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.45rem; }
.pf-member { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.15rem; width: 100%; }
.pf-actions .pf-member { flex: 1 1 100%; }
.pf-job-top, .pf-up-top { display: flex; flex-direction: column; gap: 0.35rem; }
.pf-job-id { font-family: ui-monospace, monospace; font-weight: 700; color: #0f766e; }
.pf-job-title { font-weight: 600; }
.pf-meta { font-size: 0.78rem; color: #64748b; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.pf-chip {
  font-size: 0.72rem; font-weight: 650; border-radius: 999px; padding: 0.12rem 0.45rem;
  background: #f1f5f9; color: #334155;
}
.pf-chip.rappel { background: #f3e8ff; color: #6b21a8; }
.pf-chip.ascend { background: #dcfce7; color: #166534; }
.pf-chip.stale { background: #ffedd5; color: #9a3412; }
.pf-chip.overdue, .pf-date.overdue { background: #fee2e2; color: #b91c1c; }
.pf-date { font-weight: 700; font-size: 0.85rem; }
.pf-date.overdue { border-radius: 999px; padding: 0.05rem 0.4rem; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pf-btn.primary { background: #0f766e; color: #fff; border-color: #0f766e; }
.pf-btn.quiet { background: #f8fafc; }
.pf-panel { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.45rem; border-top: 1px solid #e2e8f0; padding-top: 0.6rem; }
.pf-field { display: flex; flex-direction: column; gap: 0.2rem; }
.pf-field label { font-size: 0.72rem; font-weight: 650; color: #475569; }
.pf-rem { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.45rem 0; border-bottom: 1px solid #f1f5f9; }
.pf-bucket { margin: 0.2rem 0; }
.pf-bucket h3 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.pf-empty { color: #64748b; font-size: 0.85rem; padding: 0.4rem 0; }
.pf-picker { display: flex; flex-direction: column; gap: 0.25rem; max-height: 14rem; overflow: auto; border: 1px solid #e2e8f0; border-radius: 0.7rem; padding: 0.35rem; background: #fff; }
.pf-picker label { display: flex; gap: 0.45rem; align-items: flex-start; padding: 0.35rem; border-radius: 0.45rem; font-size: 0.85rem; }
.pf-picker label:hover { background: #f8fafc; }
.pf-gantt-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  background: #fff;
}
.pf-gantt-sheet { display: flex; align-items: flex-start; width: max-content; min-width: 100%; }
.pf-gantt-tracks { flex: 1 0 auto; }
.pf-gantt-labels {
  position: sticky;
  left: 0;
  z-index: 3;
  flex: 0 0 9.5rem;
  background: #fff;
  box-shadow: 1px 0 0 #e2e8f0;
}
.pf-gantt-label {
  box-sizing: border-box;
  min-height: 2.4rem;
  background: #fff;
  padding: 0.35rem 0.45rem;
  font-size: 0.75rem;
  line-height: 1.25;
  overflow: hidden;
  border-bottom: 1px solid #f1f5f9;
}
.pf-gantt-label.group { background: #f8fafc; font-weight: 700; }
.pf-gantt-label small { display: block; color: #64748b; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-gantt-track { position: relative; box-sizing: border-box; height: 2.4rem; border-bottom: 1px solid #f1f5f9; }
.pf-day {
  position: absolute; top: 0; bottom: 0; border-left: 1px solid #f1f5f9; font-size: 0.6rem; color: #94a3b8;
  padding-left: 2px; pointer-events: none;
}
.pf-day.monday { border-left-color: #cbd5e1; }
.pf-today {
  position: absolute; top: 0; bottom: 0; width: 2px; background: #0f766e; z-index: 1; pointer-events: none;
}
.pf-bar {
  position: absolute; top: 0.45rem; height: 1.35rem; border-radius: 0.35rem; z-index: 1;
}
.pf-bar-open { background: #99f6e4; }
.pf-bar-overdue { background: #fecaca; box-shadow: inset 0 0 0 1px #ef4444; }
.pf-bar-done { background: #e2e8f0; color: #64748b; }
.pf-bar-rappel { box-shadow: inset 3px 0 0 #7e22ce; }
.pf-bar-ascend { box-shadow: inset 3px 0 0 #15803d; background-image: repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(255,255,255,0.45) 3px, rgba(255,255,255,0.45) 6px); }
.pf-bar-marker { border-radius: 999px; }
.pf-nodate { font-size: 0.72rem; color: #64748b; display: flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.4rem; }
.pf-nodate input[type="date"] { font-size: 0.8rem; border: 1px solid #cbd5e1; border-radius: 0.4rem; padding: 0.15rem 0.3rem; }
.pf-legend { display: flex; flex-wrap: wrap; gap: 0.45rem 0.8rem; font-size: 0.72rem; color: #475569; }
.pf-swatch { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 0.15rem; margin-right: 0.2rem; vertical-align: -1px; }
@media (max-width: 799px) {
  .pf-actions .pf-btn { flex: 1 1 calc(50% - 0.35rem); justify-content: center; }
  .pf-root { padding-bottom: 1.5rem; }
}
@media (min-width: 800px) {
  .pf-job-top, .pf-up-top { flex-direction: row; align-items: center; justify-content: space-between; gap: 0.8rem; }
  .pf-job-main { flex: 1 1 auto; min-width: 0; }
  .pf-gantt-labels { flex-basis: 16rem; }
  .pf-gantt-label { font-size: 0.8rem; }
  .pf-field-row { display: grid; grid-template-columns: 1fr 11rem; gap: 0.5rem; }
}

/* Timeline (My portfolio): grouped by group and job, a shared time axis, Calendar colours. */
.pf-tl-controls { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; }
.pf-tl-controls select { border: 1px solid #cbd5e1; border-radius: 0.5rem; padding: 0.3rem 0.4rem; font-size: 0.85rem; background: #fff; }
.pf-tl-controls .pf-zoom button { min-height: 2.5rem; }
.pf-zoom { display: inline-flex; gap: 0.25rem; }
.pf-zoom button[aria-pressed="true"] { background: #0f766e; color: #fff; border-color: #0f766e; }
.pf-tl-groups { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pf-chipbtn { min-height: 2.5rem; padding: 0.3rem 0.75rem; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: #334155; font-size: 0.8rem; font-weight: 600; }
.pf-chipbtn[aria-pressed="true"] { background: #0f766e; border-color: #0f766e; color: #fff; }
.pf-tl-note { margin: 0; }
.pf-sw-overdue { background: #fee2e2; box-shadow: inset 0 0 0 2px #dc2626; }
.pf-sw-today { background: #ef4444; width: 0.2rem; }
.pf-tl-scroll { overflow: auto; max-height: 70vh; border: 1px solid #e2e8f0; border-radius: 0.8rem; background: #fff; -webkit-overflow-scrolling: touch; }
.pf-tl-sheet { position: relative; min-width: 100%; }
.pf-tl-row { display: flex; align-items: stretch; border-bottom: 1px solid #f1f5f9; }
.pf-tl-label {
  position: sticky; left: 0; z-index: 4; flex: 0 0 176px; width: 176px; box-sizing: border-box; padding: 0.35rem 0.5rem;
  background: #fff; border-right: 1px solid #e2e8f0; font-size: 0.78rem; font-weight: 600; line-height: 1.25; overflow: hidden;
}
.pf-tl-label small { display: block; color: #64748b; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-tl-axis { position: sticky; top: 0; z-index: 6; background: #f8fafc; }
.pf-tl-axis .pf-tl-label { background: #f8fafc; z-index: 7; }
.pf-tl-axis-track { height: 3rem; }
.pf-tl-band { position: absolute; top: 0; height: 1.4rem; line-height: 1.4rem; padding-left: 0.35rem; font-size: 0.72rem; font-weight: 700; color: #334155; border-left: 1px solid #cbd5e1; box-sizing: border-box; white-space: nowrap; overflow: hidden; }
.pf-tl-ticks { position: absolute; left: 0; right: 0; top: 1.4rem; height: 1.5rem; }
.pf-tl-tick { position: absolute; top: 0; height: 1.5rem; line-height: 1.5rem; text-align: center; font-size: 0.65rem; color: #64748b; box-sizing: border-box; border-left: 1px solid #f1f5f9; }
.pf-tl-tick.monday { border-left-color: #cbd5e1; color: #334155; font-weight: 700; }
.pf-tl-tick.weekend { background: rgba(148,163,184,0.12); }
.pf-tl-grp { background: #f1f5f9; }
.pf-tl-grp .pf-tl-label { background: #f1f5f9; font-weight: 800; font-size: 0.82rem; }
.pf-tl-grp .pf-tl-track { background: #f1f5f9; min-height: 1.9rem; }
.pf-tl-track { position: relative; flex: 0 0 auto; box-sizing: border-box; background-image: linear-gradient(to right, #f1f5f9 1px, transparent 1px); background-size: 168px 100%; }
.pf-tl-job.has-overdue .pf-tl-label { box-shadow: inset 3px 0 0 #dc2626; }
.pf-tl-job.settled { opacity: 0.6; }
.pf-tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; z-index: 3; pointer-events: none; }
.pf-tl-mk {
  position: absolute; z-index: 2; height: 18px; min-width: 14px; border-radius: 5px; padding: 0; border: 0;
  background: var(--c, #0d9488); cursor: pointer;
}
.pf-tl-mk::before { content: ""; position: absolute; inset: -12px -6px; } /* 44px touch target */
.pf-tl-mk:not(.range) { width: 14px !important; border-radius: 50% 50% 50% 0; transform: rotate(-45deg) scale(0.85); }
.pf-tl-mk.overdue { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #dc2626; }
.pf-tl-mk.done { opacity: 0.4; }
.pf-tl-mk.sel { outline: 2px solid #0f172a; outline-offset: 2px; }
.pf-tl-detail { border: 1px solid #e2e8f0; border-radius: 0.8rem; background: #fff; padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.3rem; }
.pf-tl-detail.overdue { border-color: #fecaca; background: #fff7f7; }
.pf-tl-detail-title { font-weight: 700; }
.pf-tl-tag { display: inline-block; border-radius: 999px; padding: 0.05rem 0.5rem; font-size: 0.68rem; font-weight: 700; white-space: nowrap; }
.pf-group-head.pf-static { cursor: default; }
.pf-tl-ul { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.pf-tl-item { display: grid; grid-template-columns: 6.5rem 1fr auto auto; gap: 0.4rem; align-items: baseline; padding: 0.3rem 0.4rem 0.3rem 0.5rem; border-left: 4px solid var(--c, #0d9488); border-radius: 0.3rem; background: #f8fafc; font-size: 0.82rem; }
.pf-tl-item.overdue { background: #fef2f2; border-left-color: #dc2626; }
.pf-tl-item.done { opacity: 0.55; text-decoration: line-through; }
.pf-tl-item.undated { border-left-color: #cbd5e1; }
.pf-tl-when { font-weight: 700; color: #334155; }
.pf-tl-what { min-width: 0; word-break: break-word; }
.pf-tl-today-row { text-align: center; font-size: 0.72rem; font-weight: 800; color: #b91c1c; border-top: 2px solid #ef4444; padding-top: 0.15rem; margin: 0.2rem 0; }
.pf-tl-later { font-size: 0.75rem; color: #64748b; padding: 0.2rem 0.5rem; }
@media (max-width: 719px) {
  .pf-tl-item { grid-template-columns: 5.5rem 1fr; }
  .pf-tl-item .pf-tl-tag, .pf-tl-item .pf-chip { grid-column: 2; justify-self: start; }
  .pf-tl-label { flex-basis: 132px; width: 132px; }
}
