/* REQ-126: the Project plan and plans per epic. The colour tokens (:root) and shared components are in ../styles.css; this file never defines :root variables. */

/* Project plan */
.plan section { display: flex; flex-direction: column; gap: 12px; }
.plan-lede { margin: -8px 0 0; color: var(--mute); max-width: 75ch; }
.plan-h { margin: 0; font: 800 24px/1.15 var(--font-display); }
.plan .sub { margin: 0; color: var(--mute); font-size: 14px; max-width: 75ch; }

.tracks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr); gap: 14px; }
@media (max-width: 900px) { .tracks { grid-template-columns: minmax(0, 1fr); } }
.track { background: var(--panel); border: 1px solid var(--line); border-top: 5px solid var(--t); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tr-app { --t: var(--app); --t-soft: var(--app-soft); } 
.tr-website { --t: var(--web); --t-soft: var(--web-soft); } 
.tr-both { --t: var(--both); --t-soft: var(--both-soft); }
.track-tag { align-self: flex-start; font: 700 10.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--t); background: var(--t-soft); padding: 5px 9px; border-radius: 999px; }
.track h3 { margin: 0; font: 800 22px/1.1 var(--font-display); }
.track p { margin: 0; color: var(--mute); font-size: 14px; }
.track .warn { color: var(--needs); font-weight: 700; }
.products { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.products li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--sunken); font-weight: 700; font-size: 14px; }
.products li b { font: 700 12px/1.6 var(--font-mono); color: var(--t); }
.track-nums { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--mute); }
.track-nums strong { font: 800 18px/1 var(--font-mono); color: var(--ink); }

.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--mute); }
.lg::before { content: ""; display: inline-block; width: 22px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--c); }
.lg.app { --c: var(--app); } 
.lg.website { --c: var(--web); } 
.lg.both { --c: var(--both); }
.lg.both::before { background: repeating-linear-gradient(90deg, var(--both) 0 5px, transparent 5px 9px); }
.map-scroll { overflow-x: auto; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); }
.map { min-width: 680px; }
.map svg { display: block; width: 100%; height: auto; }
.map .lane { fill: var(--sunken); opacity: .7; }
.map .lane-app { fill: var(--app-soft); } 
.map .lane-website { fill: var(--web-soft); }
.map .lane-name { font: 700 12px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; fill: var(--faint); }
.map .edge { fill: none; stroke-width: 2.5; transition: opacity .2s; }
.map .e-app { stroke: var(--app); } 
.map .e-website { stroke: var(--web); } 
.map .e-both { stroke: var(--both); stroke-dasharray: 6 5; }
.map .mk-app { fill: var(--app); } 
.map .mk-website { fill: var(--web); } 
.map .mk-both { fill: var(--both); }
.map .off { opacity: .14; }
.map .node { cursor: pointer; transition: opacity .2s; }
.map .node-box { fill: var(--panel); stroke-width: 2; }
.map .node.sel .node-box { stroke-width: 4; }
.map .node:focus-visible { outline: none; } 
.map .node:focus-visible .node-box { stroke-width: 4; stroke-dasharray: 4 3; }
.map .node-name { font: 800 16px var(--font-display); fill: var(--ink); }
.map .node-focus { font: 600 12px var(--font-body); fill: var(--mute); }
.map .sd { stroke: var(--panel); stroke-width: 2; fill: var(--idle); }
.map .sd-working { fill: var(--working); } 
.map .sd-review { fill: var(--review); } 
.map .sd-meeting { fill: var(--meeting); } 
.map .sd-needs-you { fill: var(--needs); } 
.map .sd-done { fill: var(--done); } 
.map .sd-blocked { fill: var(--blocked); }
.map .badge { cursor: pointer; }
.map .badge circle { fill: var(--panel); stroke-width: 2.5; }
.map .b-app circle { stroke: var(--app); } 
.map .b-website circle { stroke: var(--web); } 
.map .b-both circle { stroke: var(--both); }
.map .badge text { font: 800 12px var(--font-mono); fill: var(--ink); }
.map .badge:focus-visible { outline: none; } 
.map .badge:focus-visible circle { stroke-width: 4; }
.handoffs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.ho { overflow-wrap: anywhere; }
.ho { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--t); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: opacity .2s; }
.ho.off { opacity: .4; }
.ho.sel { box-shadow: 0 0 0 2px var(--t); }
.ho-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
div.ho-head { cursor: default; }
.ho-head b { flex: 1; min-width: 0; font-size: 14px; }
.ho-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ho-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--t); font: 800 11px/1 var(--font-mono); }
.ho ul { margin: 0; padding: 0 0 0 32px; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.ho ul li { display: flex; flex-direction: column; }
.ho-who { font: 600 11.5px/1.4 var(--font-mono); color: var(--faint); }

.plan-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
@media (max-width: 400px) { .plan-teams { grid-template-columns: minmax(0, 1fr); } }
.pteam { background: var(--panel); border: 1px solid var(--line); border-top: 5px solid var(--tc); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pteam-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pteam-head h3 { margin: 0; font: 800 20px/1.15 var(--font-display); }
.crew { display: flex; flex-wrap: wrap; gap: 6px; }
.mate { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--sunken); font-size: 13px; font-weight: 700; }
.mate img { border-radius: 50%; }
.sd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--idle)); }
.dls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dl { border-left: 3px solid var(--t); padding: 2px 0 2px 10px; display: flex; flex-direction: column; gap: 4px; }
.dl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dl-head b { font-size: 14.5px; margin-right: 2px; }
.dl p { margin: 0; color: var(--mute); font-size: 13.5px; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 6px; font: 600 11.5px/1.4 var(--font-mono); color: var(--faint); }
.dl-meta .owners { color: var(--mute); }
.dl-meta .ref { color: var(--accent); text-decoration: none; }
.dl-meta a.ref:hover { text-decoration: underline; }
.dl-none { color: var(--mute); font-size: 13.5px; }

.road { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .road { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .road { grid-template-columns: minmax(0, 1fr); } }
.road-col { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px !important; min-width: 0; }
.road-col h3 { margin: 0; display: flex; align-items: center; justify-content: space-between; font: 800 18px/1.1 var(--font-display); }
.road-n { font: 700 12px/1 var(--font-mono); color: var(--faint); }
.road-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.road-item { border-left: 3px solid var(--t); background: var(--sunken); border-radius: 4px 10px 10px 4px; padding: 7px 10px; display: flex; flex-direction: column; gap: 2px; }
.road-item b { font-size: 13.5px; }
.road-item span { font-size: 12px; color: var(--mute); }
.ph-shipped h3 { color: var(--done); }
.plan-q { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.plan-q .q-team, .plan-q .q-owner { color: var(--needs); font-weight: 700; }

/* Plans per epic (REQ-49; Pablo's UI/UX check, 5 Oct). Status chips are
   shape + label on the existing status families: done ✓ on done-soft, in
   progress ● on working-soft, waiting ring on needs-soft, to do ring on
   idle-soft; Needs Steven is a diamond in needs ink on needs-soft. */
.eplan-pick { display: flex; }
.eplan-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--sunken); max-width: 100%; overflow-x: auto; }
.eplan-tab { flex: none; display: inline-flex; gap: 6px; align-items: baseline; border: 0; background: transparent; color: var(--mute); padding: 8px 12px; border-radius: 10px; font: 700 13.5px/1.2 var(--font-body); cursor: pointer; }
.eplan-tab.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.eplan-tab:focus-visible, .eplan-select select:focus-visible, .eplan-phase summary:focus-visible, .ms-steven:focus-visible, .ms-edit select:focus-visible, .eplan-body:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eplan-id { font: 700 11px/1 var(--font-mono); color: var(--faint); }
.eplan-select { display: none; }
.eplan-select select { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 600 15px/1.2 var(--font-body); }
.eplan-body { display: flex; flex-direction: column; gap: 12px; border-radius: 18px; }
.eplan-top { display: flex; flex-direction: column; gap: 8px; }
.eplan-head { margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--ink); font: 600 17px/1.35 var(--font-body); }
.eplan-prog { display: flex; gap: 10px; align-items: center; color: var(--mute); font-size: 14px; }
.eplan-prog progress { flex: 1; max-width: 320px; height: 8px; accent-color: var(--done); }
.eplan-phase { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px; }
.eplan-phase summary { display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; border-radius: 10px; }
.eplan-phase summary::-webkit-details-marker { display: none; }
.eplan-phase summary::before { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: rotate(-45deg); transition: transform .15s; flex: none; margin-right: 2px; }
.eplan-phase[open] summary::before { transform: rotate(45deg); }
.eplan-phase h3 { margin: 0; font: 800 17px/1.2 var(--font-display); color: var(--ink); }
.ms-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.ms { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.ms-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.ms-title { color: var(--ink); font-weight: 700; }
.ms-meta { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.ms-from, .ms-edit { grid-column: 1 / -1; }
.ms-from { margin: 0; color: var(--faint); font-size: 12.5px; overflow-wrap: anywhere; }
.ms-from.ms-set { font-style: italic; }
.ms-owner { display: inline-flex; gap: 6px; align-items: center; color: var(--mute); font-size: 13.5px; white-space: nowrap; }
.ms-owner img { border-radius: 50%; }
.ms-nobody { color: var(--needs); font-weight: 700; }
.ms-waits { color: var(--mute); font-size: 13px; }
.ms-chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 9px; border-radius: 999px; font: 700 12px/1.2 var(--font-body); white-space: normal; }
.ms-g { width: 9px; height: 9px; flex: none; border-radius: 50%; box-sizing: border-box; }
.ms-chip.ms-done { color: var(--done); background: var(--done-soft); }
.ms-chip.ms-done .ms-g { width: 10px; height: 6px; border-radius: 0; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translate(1px, -1px); }
.ms-chip.ms-doing { color: var(--working); background: var(--working-soft); }
.ms-chip.ms-doing .ms-g { background: currentColor; }
.ms-chip.ms-waiting { color: var(--needs); background: var(--needs-soft); }
.ms-chip.ms-waiting .ms-g { border: 2px solid currentColor; }
.ms-chip.ms-todo { color: var(--idle); background: var(--idle-soft); }
.ms-chip.ms-todo .ms-g { border: 2px solid currentColor; }
.ms-steven { display: inline-flex; gap: 6px; align-items: center; padding: 4px 9px; border-radius: 999px; color: var(--needs); background: var(--needs-soft); font: 700 12px/1.2 var(--font-body); text-decoration: none; }
.ms-steven:hover { text-decoration: underline; }
.ms-diamond { width: 8px; height: 8px; flex: none; background: currentColor; transform: rotate(45deg); }
.ms-note { grid-column: 1 / -1; margin: 0; color: var(--mute); font-size: 13.5px; overflow-wrap: anywhere; }
.ms-asked { font-style: italic; }
.ms-ref { font: 600 12.5px/1.2 var(--font-mono); color: var(--accent); }
.eplan-note { margin: 0; color: var(--mute); font-size: 14px; max-width: 90ch; }
.eplan-note b { color: var(--ink); }
.eplan-why { margin: 8px 0 0; color: var(--mute); font-size: 14px; }
.eplan-who { color: var(--faint); font-size: 13px; }
.ms-edit { display: inline-flex; gap: 8px; align-items: center; color: var(--mute); font-size: 13px; }
.ms-edit select { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; }
@media (max-width: 600px) {
  .eplan-tabs { display: none; }
  .eplan-select { display: block; width: 100%; }
  .eplan-phase { padding: 10px 12px; }
  .ms-list { gap: 8px; }
  .ms { grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--sunken); }
  .ms-meta { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .eplan-phase summary::before { transition: none; } }
.map .edge.quiet { stroke-width: 1.3; stroke-dasharray: 2 4; opacity: .55; }
.map .edge.quiet.off { opacity: .08; }
.ho-n.ho-thin { border-style: dotted; }
.plan-lede, .plan .sub { max-width: 72ch; }

/* REQ-92.1: Messages. Desktop: the conversation list left, the thread right;
   phone (< 760 px): the list, then a thread as its own screen with Back. */
.ms-grid { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; align-items: start; }
