/* roadmap.css
   Roadmap view: month plan (gantt), timeline, cross table, track grids.
   ------------------------------------------------------------------------- */

.tl { padding: 40px 0 0; display: grid; gap: 0; }

.tl-item {
  display: grid; grid-template-columns: 176px 1fr; gap: 30px;
  padding: 24px 0; border-top: 1px solid var(--line); position: relative;
}

.tl-item:first-child { border-top: 0; }

.tl-l { position: relative; }

.tl-ph { font-size: 17px; font-weight: 750; letter-spacing: -.018em; margin-bottom: 4px; }

.tl-when { font-size: 12.5px; color: var(--ink-3); font-family: var(--mono); }

.tl-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px;
}

.tl-item[data-state="done"] .tl-badge { background: var(--ok-soft); color: var(--ok); }

.tl-item[data-state="next"] .tl-badge { background: var(--accent-soft); color: var(--c-red); }

.tl-item[data-state="later"] .tl-badge { background: var(--idle-soft); color: var(--ink-3); }

.tl-r { font-size: 15.5px; color: var(--ink-2); line-height: 1.65; max-width: 72ch; }

.tl-count {
  font-size: 33px; font-weight: 800; letter-spacing: -.04em; color: var(--ink);
  font-variant-numeric: tabular-nums; line-height: 1; margin-bottom: 6px;
}

.tl-count span { font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 5px; }

.p2 { padding: 48px 0 0; }

.p2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(316px, 1fr)); gap: 16px; margin-top: 20px; }

.p2-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: 20px 21px; position: relative; overflow: hidden;
}

.p2-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--m-c, var(--line-2)); }

.p2-card h3 { font-size: 16.5px; margin: 9px 0 9px; letter-spacing: -.018em; }

/* A released Phase 2 use case now has a real screenshot; the ones still in
   planning keep the plain card. */
.p2-shot {
  display: block; margin: -19px -19px 14px -19px;
  border-bottom: 1px solid var(--line); background: var(--bg-3);
  aspect-ratio: 16 / 7; overflow: hidden;
}
.p2-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }

.p2-card .tag { font-size: 14px; color: var(--ink-2); line-height: 1.55; }

.p2-card.open { border-style: dashed; background: transparent; }

.p2-card.open::before { display: none; }

.p2-card.open .slotno { font-family: var(--mono); font-size: 26px; font-weight: 800; color: var(--line-2); letter-spacing: -.04em; }

@media (max-width: 860px) {
  .tl-item { grid-template-columns: minmax(0,1fr); gap: 12px; }
}

@media (max-width: 660px) {
  .p2-grid, .rel-grid { grid-template-columns: minmax(0,1fr); }
}

.cross { border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }

.cross-hd, .cross-row {
  display: grid; grid-template-columns: 46px minmax(0, 1.5fr) minmax(0, 1fr) 30px minmax(0, 1fr);
  gap: 14px; align-items: center; padding: 13px 18px;
  background: var(--surface); border-top: 1px solid var(--line);
}

.cross-hd {
  border-top: 0; background: var(--bg-2); padding-top: 10px; padding-bottom: 10px;
  font-size: 10.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}

.cross-no { font-size: 12px; font-weight: 800; color: var(--ink-3); }

.cross-nm b { font-size: 14.5px; font-weight: 650; letter-spacing: -.012em; }

.cross-c { display: flex; flex-wrap: wrap; gap: 5px; }

.cross-a { color: var(--ink-3); display: grid; place-items: center; }

.cross-a svg { width: 17px; height: 17px; }

.p2-card { text-align: left; cursor: pointer; display: flex; flex-direction: column; }

.p2-card:hover { border-color: var(--m-c); transform: translateY(-2px); box-shadow: var(--shadow-2); }

.p2-card .card-mod { margin-bottom: 9px; }

.p2-card .card-go { margin-top: 15px; margin-left: 0; }

.p2-val {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 14px;
  padding-top: 13px; border-top: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--ok); line-height: 1.45;
}

.p2-val svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }

.tl-title { display: block; font-size: 16.5px; letter-spacing: -.018em; margin-bottom: 7px; color: var(--ink); }

.tl-item[data-state="now"] .tl-badge { background: var(--ok-soft); color: var(--ok); }

@media (max-width: 900px) {
  .cross-hd { display: none; }
  .cross-row {
      grid-template-columns: 46px minmax(0, 1fr); row-gap: 9px; padding: 15px 16px;
  }
  .cross-c, .cross-a { grid-column: 2; }
  .cross-a { justify-content: flex-start; transform: rotate(90deg); width: 18px; }
}

.gantt {
  border: 1px solid var(--line); border-radius: var(--r-l);
  background: var(--surface); overflow: hidden;
}

.gantt-row {
  display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
  gap: 18px; align-items: center;
  padding: 13px 18px; border-top: 1px solid var(--line);
}

.gantt-row:first-child { border-top: 0; }

.gantt-head { background: var(--bg-2); padding-top: 9px; padding-bottom: 9px; }

.gantt-lbl { min-width: 0; }

.gantt-lbl b { display: block; font-size: 14px; font-weight: 650; letter-spacing: -.012em; line-height: 1.35; }

.gantt-lbl span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; line-height: 1.45; }

.gantt-track {
  position: relative; display: grid; grid-template-columns: repeat(var(--gm, 5), 1fr);
  min-height: 34px; align-items: center;
}

.gantt-m {
  font-family: var(--mono); font-size: 10.5px; font-weight: 750; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-3); text-align: center;
}

.gantt-head .gantt-track { min-height: 0; }

.gantt-cell { border-left: 1px dashed var(--line); height: 34px; }

.gantt-cell:first-child { border-left: 0; }

.gantt-bar {
  position: absolute; top: 3px; bottom: 3px; border-radius: 6px;
  display: flex; align-items: center; gap: 8px; padding: 0 10px; overflow: hidden;
  background: var(--bar); color: var(--bar-ink); border: 1px solid var(--bar-line);
}

.gantt-bar em {
  font-style: normal; font-family: var(--mono); font-size: 11px; font-weight: 800;
  flex-shrink: 0; opacity: .95;
}

.gantt-bar-t {
  font-size: 11.5px; font-weight: 650; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.gantt-bar[data-tone="now"] { --bar: var(--ok-soft);     --bar-ink: var(--ok);     --bar-line: color-mix(in srgb, var(--ok) 26%, transparent); }

.gantt-bar[data-tone="high"] { --bar: var(--c-red);       --bar-ink: var(--on-brand);          --bar-line: var(--c-red); }

.gantt-bar[data-tone="med"] { --bar: var(--warn-soft);   --bar-ink: var(--warn);   --bar-line: color-mix(in srgb, var(--warn) 30%, transparent); }

.gantt-bar[data-tone="low"] { --bar: var(--bg-3);        --bar-ink: var(--ink-2);  --bar-line: var(--line-2); }

.gantt-bar[data-tone="cont"] { --bar: transparent;        --bar-ink: var(--ink-3);  --bar-line: var(--line-2); }

.gantt-bar[data-tone="cont"] { border-style: dashed; }

.trk-hd { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; flex-wrap: wrap; }

.trk-n { font-size: 12px; color: var(--ink-3); margin-left: auto; }

@media (max-width: 860px) {
  .gantt-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gantt-head { display: none; }
  .gantt-track { min-height: 30px; }
  .gantt-cell { height: 30px; }
  .gantt-bar { position: static; height: 30px; width: auto !important; left: auto !important; }
  .gantt-track { display: block; }
  .gantt-bar-t { white-space: normal; }
}

/* --------------------------------------------------------------- v1.1 ---
   The priority pill under a timeline item, and the status row on a track
   card now that Phase 2 cards carry a real delivery status. */
.tl-prio { display: block; margin-top: 8px; }
.p2-card .card-ft {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line);
}

/* Dark-mode overrides for this module, moved out of global/base.css in v1.1
   so a view's dark behaviour lives beside its light behaviour. */
html[data-theme="dark"] .tl-item[data-state="next"] .tl-badge { color: var(--accent); }
html[data-theme="dark"] .gantt-bar[data-tone="high"] { --bar: var(--accent); --bar-ink: var(--accent-ink); --bar-line: var(--accent); }
