/* My Team's Annual Expectations (script: plan_team_expectations.js). Every colour is a theme variable from
 * style.css, so light, dark and auto follow the theme switch. One full-width block per person; inside it a
 * table that copies Brian's "Alie Expectations" sheet: Section | Expectation | Q1 | Q2 | Q3 | Q4 | My comments |
 * Their comments. 393px first: the table scrolls sideways inside its block (.ptx-scroll), never the page. */
.ptx { padding: 4px 4px 56px; max-width: 100%; min-width: 0; box-sizing: border-box; }
.ptx *, .ptx *::before, .ptx *::after { box-sizing: border-box; }
.ptx-head h2 { margin: 6px 0 4px; }
.ptx-sub { color: var(--text-muted); font-size: 13px; line-height: 1.45; max-width: 78ch; margin: 0 0 12px; overflow-wrap: anywhere; }
.ptx-pad { padding: 10px 14px; }
.ptx button { font: inherit; color: inherit; }

/* ---- toolbar + picker ---- */
.ptx-toolbar { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; }
.ptx-btn {
  border: 1px solid var(--border); background: var(--bg-raised); color: var(--text); font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; cursor: pointer; min-height: 32px;
}
.ptx-btn:hover { border-color: var(--accent); }
.ptx-btn-primary { background: var(--accent-soft); color: var(--accent-on); border-color: var(--accent); }
.ptx-linkbtn { border: 0; background: none; color: var(--accent-on); font-size: 12px; font-weight: 600; padding: 2px 4px; cursor: pointer; border-radius: 4px; }
.ptx-linkbtn:hover:not(:disabled) { text-decoration: underline; }
.ptx-linkbtn:disabled { color: var(--text-dim); cursor: default; }
.ptx button:focus-visible, .ptx textarea:focus-visible, .ptx input:focus-visible, .ptx-scroll:focus-visible, .ptx-pop button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ptx-picker { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; margin: 0 0 14px; max-width: 640px; }
.ptx-picker-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }
.ptx-picker-head label { font-size: 12.5px; font-weight: 600; flex: 1 1 100%; }
.ptx-picker-head input { flex: 1 1 200px; min-width: 0; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; }
.ptx-pick-list { list-style: none; margin: 0; padding: 4px 0; max-height: 320px; overflow-y: auto; }
.ptx-pick-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px; }
.ptx-pick-list li + li { border-top: 1px solid var(--border-soft); }
.ptx-pick-who { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }

/* ---- a person's block ---- */
.ptx-people { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.ptx-person { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; color: var(--text); min-width: 0; }
.ptx-p-head { padding: 10px 14px; }
.ptx-person:not(.collapsed) .ptx-p-head { border-bottom: 1px solid var(--border-soft); }
.ptx-p-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.ptx-toggle { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0; min-height: 32px; border: 0; background: none; padding: 4px 0; cursor: pointer; text-align: left; border-radius: 6px; }
.ptx-caret { display: inline-block; width: 14px; color: var(--text-muted); font-size: 12px; flex: none; }
.ptx-who { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ptx-who h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.ptx-title { color: var(--text-muted); font-size: 12.5px; overflow-wrap: anywhere; }
.ptx-counts { color: var(--text-muted); font-size: 12.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ptx-years { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-raised); padding: 2px; flex: none; }
.ptx-year { border: 0; background: transparent; color: var(--text-muted); font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; cursor: pointer; min-height: 28px; }
.ptx-year:hover { color: var(--text); }
.ptx-year.active { background: var(--accent-soft); color: var(--accent-on); box-shadow: inset 0 0 0 1px var(--accent); }
.ptx-menu { position: relative; flex: none; }
.ptx-iconbtn { border: 1px solid var(--border); background: var(--bg-raised); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 18px; line-height: 1; color: var(--text-muted); }
.ptx-iconbtn:hover { color: var(--text); border-color: var(--accent); }
.ptx-menu-list { position: absolute; right: 0; top: 36px; z-index: 30; min-width: 190px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 22px rgba(16, 20, 30, 0.18); padding: 4px; }
.ptx-menu-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--danger-text); }
.ptx-menu-list button:hover { background: var(--bg-raised); }

/* personal commitments: a small strip in the header, not a second column */
.ptx-commits { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding-left: 22px; }
.ptx-commits-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; }
.ptx-commit { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px solid var(--border); background: var(--bg); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12px; }
.ptx-commit-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.ptx-goal { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent-on); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptx-goal-partial { background: var(--bg-raised); color: var(--text-muted); }
.ptx-nogoal { background: var(--bg-raised); color: var(--warn-text); }

/* ---- the table (the sheet) ---- */
.ptx-scroll { overflow-x: auto; overscroll-behavior-x: contain; max-width: 100%; border-radius: 0 0 12px 12px; }
.ptx-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; font-size: 13px; }
.ptx-table th, .ptx-table td { border-bottom: 1px solid var(--border-soft); border-right: 1px solid var(--border-soft); padding: 6px 8px; vertical-align: top; text-align: left; }
.ptx-table th:last-child, .ptx-table td:last-child { border-right: 0; }
.ptx-table thead th { background: var(--bg-raised); color: var(--text-muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
.ptx-h-sec, .ptx-sec { width: 96px; min-width: 96px; }
.ptx-h-exp { min-width: 240px; }
.ptx-h-st, .ptx-st { width: 160px; min-width: 150px; }
.ptx-h-q, .ptx-q { width: 72px; min-width: 72px; text-align: center !important; padding-left: 4px; padding-right: 4px; }
.ptx-h-cm, .ptx-cm { width: 220px; min-width: 200px; }
.ptx-cur { background: var(--accent-soft); }
.ptx-table thead th.ptx-cur { color: var(--accent-on); box-shadow: inset 0 -2px 0 var(--accent); }
.ptx-sec { background: var(--bg); font-weight: 600; font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ptx-sec-name { display: block; overflow-wrap: anywhere; }
.ptx-sec-count { display: block; font-weight: 500; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ptx-exp { overflow-wrap: anywhere; line-height: 1.4; }
/* The expectation's title and measure text print in full and wrap: no clamp, no ellipsis, no collapse. */
.ptx-etitle { font-size: 13px; font-weight: 600; color: var(--text); white-space: normal; overflow-wrap: anywhere; }
.ptx-ebody { margin-top: 4px; color: var(--text-muted); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; line-height: 1.45; }
.ptx-exp .ptx-chip { margin-left: 6px; }
.ptx-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--bg-raised); color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; }
.ptx-status { text-transform: none; letter-spacing: 0; }

/* quarter scores */
.ptx-score { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 32px; padding: 0 6px; border-radius: 8px; border: 1px solid transparent; font-weight: 700; font-size: 13px; background: transparent; color: var(--text-dim); }
.ptx-score-btn { cursor: pointer; }
.ptx-score-btn:hover, .ptx-score-btn:focus-visible { border-color: var(--accent); background: var(--bg-raised); }
.ptx-s-none { color: var(--text-dim); font-weight: 500; }
.ptx-s-low { background: var(--bg-raised); background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--text); }
.ptx-s-mid { background: var(--bg-raised); background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--text); }
.ptx-s-high { background: var(--bg-raised); background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--text); }
.ptx-s-word { background: var(--bg-raised); color: var(--text-muted); font-size: 11px; font-weight: 600; }
.ptx-q-hidden { color: var(--text-dim); }
/* a quarter cell with no typed score shows what the linked work says, muted */
.ptx-score.ptx-s-sug { background: transparent; border: 1px dashed var(--border); color: var(--text-muted); font-size: 11px; font-weight: 600; line-height: 1.1; text-align: center; padding: 2px 4px; white-space: normal; }
.ptx-score-btn.ptx-s-sug:hover, .ptx-score-btn.ptx-s-sug:focus-visible { border-style: solid; border-color: var(--accent); }

/* ---- collapsible column groups ---- */
.ptx-table thead th.ptx-gh { text-align: left; padding: 2px 6px; }
.ptx-gbtn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 32px; min-width: 32px; padding: 0 8px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; border-radius: 6px; }
.ptx-gbtn:hover { color: var(--text); background: var(--bg); }
.ptx-gbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ptx-qbtn { padding: 0 2px; letter-spacing: 0; }
.ptx-table thead th.ptx-stub-h { width: 36px; min-width: 36px; padding: 4px 2px; text-align: center; vertical-align: middle; }
.ptx-gstub { flex-direction: column; padding: 6px 4px; }
.ptx-vert { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.ptx-table thead th.ptx-h-q.ptx-qstub { width: 40px; min-width: 40px; }
.ptx-q.ptx-qstub { width: 40px; min-width: 40px; }
.ptx-stub { width: 36px; min-width: 36px; background: var(--bg); text-align: center !important; padding-left: 2px; padding-right: 2px; }
.ptx-stub-n { display: inline-block; min-width: 20px; font-size: 11px; font-weight: 600; color: var(--text-muted); }

/* ---- status from work ---- */
.ptx-st { overflow-wrap: anywhere; line-height: 1.4; }
.ptx-w-count { display: block; margin-top: 3px; font-size: 12px; color: var(--text-muted); }
.ptx-bar { height: 6px; margin-top: 4px; border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--border-soft); overflow: hidden; }
.ptx-bar > span { display: block; height: 100%; background: var(--accent); }
.ptx-chip.ptx-w-done { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--text); }
.ptx-chip.ptx-w-in_progress { background: var(--accent-soft); color: var(--accent-on); border-color: var(--accent); }
.ptx-chip.ptx-w-blocked { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--text); border-color: var(--danger); }
.ptx-chip.ptx-w-none, .ptx-chip.ptx-w-unavailable, .ptx-chip.ptx-w-not_started { color: var(--text-muted); }
.ptx-w-cards { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; font-size: 12px; }
.ptx-w-cards a, .ptx-w-link a { color: var(--accent-on); text-decoration: none; }
.ptx-w-cards a:hover, .ptx-w-link a:hover { text-decoration: underline; }
.ptx-w-st { color: var(--text-muted); font-size: 11px; }
.ptx-w-hid { color: var(--text-muted); }
.ptx-w-links { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 12px; }
.ptx-w-link { display: inline-flex; align-items: center; gap: 2px; }
.ptx-x { min-width: 32px; min-height: 32px; font-size: 16px; color: var(--text-muted); }
.ptx-w-add { min-height: 32px; margin-top: 2px; }
.ptx-w-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.ptx-w-form input { flex: 1 1 140px; min-width: 0; min-height: 32px; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 8px; padding: 4px 8px; font: inherit; font-size: 12.5px; }
.ptx-w-err { flex: 1 1 100%; margin: 0; color: var(--danger-text); font-size: 12px; }

/* comment cells + threads */
.ptx-cm-btn { display: block; width: 100%; text-align: left; border: 1px solid transparent; background: none; border-radius: 8px; padding: 4px 6px; cursor: pointer; color: var(--text); min-height: 32px; }
.ptx-cm-btn:hover { background: var(--bg-raised); border-color: var(--border-soft); }
.ptx-cm-btn[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); }
.ptx-cm-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.35; }
.ptx-cm-meta { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ptx-cm-add { color: var(--accent-on); font-size: 12px; font-weight: 600; }
.ptx-cm-none { color: var(--text-dim); }
.ptx-thread-row > td { background: var(--bg); padding: 0; border-right: 0; }
.ptx-thread { position: sticky; left: 0; width: min(100%, calc(100vw - 56px)); max-width: 640px; }
.ptx-thread-in { padding: 10px 14px 12px; }
.ptx-thread h5 { margin: 0 0 8px; font-size: 12.5px; }
.ptx-thread h5 .muted { font-weight: 400; color: var(--text-muted); overflow-wrap: anywhere; }
.ptx-entries { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.ptx-entry { border-left: 3px solid var(--border); padding: 2px 0 2px 10px; }
.ptx-entry-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.ptx-entry-head b { color: var(--text); font-weight: 600; }
.ptx-entry-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; margin-top: 2px; }
.ptx-del { color: var(--danger-text); }
.ptx-compose { display: grid; gap: 6px; justify-items: start; }
.ptx-compose textarea { width: 100%; resize: vertical; border: 1px solid var(--border); background: var(--bg-alt); color: var(--text); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; }
.ptx-hint, .ptx-empty { color: var(--text-muted); font-size: 12.5px; margin: 2px 0 6px; }

/* the score popover is fixed to the viewport so the scrolling table cannot clip it */
.ptx-pop { position: fixed; z-index: 400; width: 232px; background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(16, 20, 30, 0.24); padding: 10px; font-size: 13px; }
.ptx-pop-head { font-weight: 600; margin-bottom: 8px; overflow-wrap: anywhere; font-size: 12.5px; }
.ptx-pop-head .muted { font-weight: 400; color: var(--text-muted); }
.ptx-pop-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ptx-pop-n { height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-raised); font-weight: 700; cursor: pointer; color: var(--text); }
.ptx-pop-n.ptx-s-low, .ptx-pop-n.ptx-s-mid, .ptx-pop-n.ptx-s-high { color: var(--text); }
.ptx-pop-n:hover { border-color: var(--accent); }
.ptx-pop-n.on { box-shadow: inset 0 0 0 2px var(--accent); }
.ptx-pop-foot { display: flex; justify-content: space-between; margin-top: 8px; }
.ptx-pop-note { margin: 8px 0 0; font-size: 11.5px; color: var(--text-muted); }

/* undo / error notice */
.ptx-notice-host { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 300; width: max-content; max-width: calc(100vw - 24px); }
.ptx-notice { display: flex; align-items: center; gap: 10px; background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; box-shadow: 0 8px 22px rgba(16, 20, 30, 0.22); font-size: 13px; }
.ptx-notice.error { border-color: var(--danger); }
.ptx-emptystate { border: 1px dashed var(--border); border-radius: 12px; padding: 18px 20px; max-width: 560px; background: var(--bg-alt); color: var(--text); }
.ptx-emptystate p { margin: 6px 0 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }

@media (max-width: 480px) {
  .ptx-p-head { padding: 10px; }
  .ptx-commits { padding-left: 0; }
  .ptx-commit-title { max-width: 160px; }
  .ptx-notice-host { bottom: 76px; }
}

/* The one-line pointer left on the Company page where the old section was. */
.plan-moved-note { margin: 12px 0; font-size: 13.5px; }
.plan-moved-note a { color: var(--accent-on); text-decoration: none; font-weight: 600; }
.plan-moved-note a:hover { text-decoration: underline; }
