/* Katalyst stage panel styles, shared by how-ai-fits.html (with css/fits.css) and preview/road.html (with css/road.css):
   the stage line's Previous / Next, the project management dashboard card and the description panel. Drawn by
   js/panel.js. Uses the home.css tokens and its stage-line (.lc-*), panel (.lc-panel ...), chip and button styles. */

/* the stage line (home.css .lc-*) with Previous and Next at its right */
.rd-nav { margin-top: 24px; display: flex; align-items: flex-start; gap: 24px; }
.rd-nav .lc-line { flex: 1; min-width: 0; margin-top: 0; }
.rd-btns { display: flex; gap: 8px; flex: none; }
.rd-btns .btn[aria-disabled="true"] { opacity: .35; cursor: default; }
.rd-btns .btn[aria-disabled="true"]:hover { background: none; color: var(--ink); }

/* the project management dashboard: a small card, placed by the page (top-left over its frame on desktop; under
   900px below the frame as one compact row) */
.rd-dash {
  position: absolute; top: 16px; left: 16px; z-index: 4;
  width: 260px; max-width: calc(100% - 32px); padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 12px; line-height: 1.35;
}
.rd-dash-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rd-dash-list { margin-top: 8px; display: grid; gap: 6px; }
.rd-dash-list li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.rd-dash-t { color: var(--muted); }
.rd-dash-v { font-weight: 600; text-align: right; }
.rd-dash-f { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* no stage chosen yet (js/panel.js dash().empty): one muted line in place of the readings */
.rd-dash-list .rd-dash-none { display: block; color: var(--muted); }
/* status dots: solid --signal = Running, --signal ring = In testing, --muted ring = We build it */
.rd-st { position: relative; width: 8px; height: 8px; border-radius: 50%; }
.rd-st--running { background: var(--signal); }
.rd-st--testing { border: 1.5px solid var(--signal); }
.rd-st--build { border: 1.5px solid var(--muted); }
/* on arrival the new values fade in over 200ms (instant with reduced motion) */
.rd-fade { transition: opacity .2s ease; }
.rd-dash.is-swap .rd-fade { opacity: 0; transition: none; }
@media (prefers-reduced-motion: reduce) { .rd-fade { transition: none; } }

/* the description panel (home.css .lc-panel); on the road it fades while the truck drives (.is-out) */
.rd-desc { margin-top: 24px; transition: opacity .25s ease; }
.rd-desc.is-out { opacity: 0; }
.rd-desc .lc-pname { font-size: 24px; }
/* the stage's name */
.rd-ph { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
/* a narrow left column (Today, Project management) and a wide right column (Where AI helps: cards, two per row) */
.rd-cols { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr); gap: 40px; }
.rd-side > div + div { margin-top: 24px; }
.rd-cards { margin-top: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rd-card { display: flex; flex-direction: column; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.rd-card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rd-card-t { font-size: 15px; font-weight: 600; line-height: 1.3; }
.rd-desc .rd-card-h .chip { flex: none; margin: 0; }
.rd-rows { margin: 10px 0 12px; display: grid; gap: 6px; }
.rd-rows > div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; }
.rd-rows dt { padding-top: 1px; font-family: var(--f-mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rd-rows dd { margin: 0; font-size: 14px; line-height: 1.4; text-wrap: pretty; }
.rd-eng { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rd-plain { grid-column: 1 / -1; font-size: 16px; line-height: 1.5; text-wrap: pretty; }

/* under 1100px Previous and Next sit above the line, so the station names keep their room */
@media (max-width: 1099.98px) {
  .rd-nav { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .rd-btns { align-self: flex-end; }
}
@media (max-width: 899.98px) {
  /* under 900px the dashboard sits under the frame as one compact row of three readings */
  .rd-dash { position: static; width: auto; max-width: none; margin-top: 10px; padding: 10px 12px; box-shadow: none; }
  .rd-dash-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .rd-dash-list li { grid-template-columns: 8px minmax(0, 1fr); align-items: center; row-gap: 2px; column-gap: 6px; align-content: start; }
  .rd-dash-v { grid-column: 1 / -1; text-align: left; }
  .rd-dash-f { margin-top: 6px; padding-top: 0; border-top: 0; }
  .rd-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rd-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .rd-side > div + div { margin-top: 0; }
  .rd-nav { gap: 12px; }
  .rd-nav .lc-line { width: calc(100% + 40px); }
  .rd-btns { align-self: flex-end; }
}
@media (min-width: 600px) and (max-width: 899.98px) { .rd-nav .lc-line { width: calc(100% + 64px); } }
@media (max-width: 699.98px) {
  /* phones: everything in the panel stacks, one card per row */
  .rd-side { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rd-cards { grid-template-columns: minmax(0, 1fr); }
}
