/* Shared by the PathCI journey pages (templates/dashboard/journeys.html, journey_place.html,
   journey_paths.html). Colors come from the v4 theme.css tokens. */
body.bg-gray-50 { background: var(--bg) !important; }
main.container { max-width: 1180px; }

.jy-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.jy-controls { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; font-size: 0.78rem; color: var(--text-3); }
.jy-controls select, .jy-controls input {
  font-family: var(--sans); font-size: 0.8rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 0.25rem 0.4rem;
}
.jy-status { font-family: var(--mono); font-size: 0.66rem; color: var(--text-3); margin-left: auto; }

.sec { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; color: var(--text-3); margin: 1.45rem 0 0.55rem; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.05rem 1.2rem; }
.panel-label { font-family: var(--mono); font-size: 0.62rem; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.3rem; }
.panel-cap { font-size: 0.72rem; color: var(--text-3); margin-top: 0.7rem; }
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0.85rem; align-items: start; }
.nozone { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 1rem 1.2rem; font-size: 0.85rem; color: var(--text-2); }
/* a count, not an alarm: the theme's headline emphasis is red */
.headline b { color: var(--text); }
.more { margin-top: 0.6rem; font-family: var(--mono); font-size: 0.68rem; color: var(--accent-2); background: none; border: 0; cursor: pointer; padding: 0; }

/* coverage strip */
.cov-line { font-family: var(--serif); font-size: 1.05rem; letter-spacing: -0.01em; line-height: 1.4; }
.cov-line b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cov-line .u { color: var(--warn); font-weight: 600; }
.cov-line .x { color: var(--text-3); font-weight: 600; }
.cov-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 0.8rem 0 0.5rem; background: var(--surface-3); }
.cov-bar i { display: block; }
.cov-res { background: var(--good); }
.cov-unl { background: repeating-linear-gradient(-45deg, var(--re-heat-3) 0 4px, var(--re-heat-1) 4px 8px); }
.cov-con { background: var(--border-strong); }
.cov-key { display: flex; flex-wrap: wrap; gap: 0.7rem 1.2rem; font-family: var(--mono); font-size: 0.66rem; color: var(--text-3); }
.cov-key b { color: var(--text-2); font-weight: 600; }
.cov-honest { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--text-2); }
.cov-honest b { color: var(--warn); }

/* zone chips */
.chip { display: inline-flex; align-items: baseline; gap: 0.35rem; border: 1px solid var(--border-strong); background: var(--surface-3); border-radius: 5px; padding: 0.18rem 0.45rem; font-size: 0.75rem; white-space: nowrap; font-family: var(--mono); }
.chip .s { font-size: 0.64rem; color: var(--text-3); }
.arrow { color: var(--text-4); font-size: 0.7rem; }
.only { font-family: var(--mono); font-size: 0.6rem; color: var(--text-4); }

.demo-notes .why { margin: 0.2rem 0 0; font-size: 0.85rem; color: var(--text-2); }

@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; }
  .headline { font-size: 1.9rem; }
}

/* ranked bars: next zone, before and after */
.flow-row { display: grid; grid-template-columns: minmax(0, 13rem) 1fr 5rem; align-items: center; gap: 0.6rem; padding: 0.13rem 0; font-size: 0.74rem; font-family: var(--mono); }
.flow-row > div:first-child { overflow-wrap: anywhere; }
.flow-track { height: 9px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.flow-track i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.flow-val { font-size: 0.68rem; text-align: right; color: var(--text-2); }

/* individual visits */
/* visits by start hour: click a bar to list that hour */
.hours { display: flex; align-items: flex-end; gap: 0.35rem; margin-bottom: 0.7rem; }
.hr-bars { display: flex; align-items: flex-end; gap: 2px; flex: 1; min-width: 0; margin-left: 0.4rem; }
.hr { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; background: none; border: 0; padding: 0; cursor: pointer; }
.hr b { display: flex; align-items: flex-end; height: 2.4rem; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.hr i { display: block; width: 100%; background: var(--accent); opacity: 0.55; }
.hr:hover i, .hr.on i { opacity: 1; }
.hr span { font-family: var(--mono); font-size: 0.56rem; color: var(--text-4); text-align: center; }
.hr.on span { color: var(--text); font-weight: 600; }
.hr:disabled { cursor: default; }
.hr-btn { font-family: var(--mono); font-size: 0.66rem; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 0.2rem 0.45rem; cursor: pointer; white-space: nowrap; margin-bottom: 0.85rem; }
.hr-btn.on { border-color: var(--border-strong); background: var(--surface-3); color: var(--text); }
.hr-btn:disabled { opacity: 0.4; cursor: default; }
.jlist { display: flex; flex-direction: column; gap: 0.5rem; }
.j { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; }
.j.open { border-color: var(--border-strong); box-shadow: 0 6px 18px rgba(13,27,42,0.05); cursor: default; }
.j-row { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 1rem; align-items: center; padding: 0.6rem 0.95rem; }
.j-when { font-family: var(--mono); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.j-dur { font-family: var(--mono); font-size: 0.64rem; color: var(--text-3); margin-top: 0.12rem; }
.j-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.j-badges { display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; }
.badge { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.03em; padding: 0.22rem 0.45rem; border-radius: 5px; white-space: nowrap; border: 1px solid transparent; }
.badge.stitch { background: var(--good-bg); color: var(--good); border-color: rgba(62,124,124,0.2); }
.badge.single { color: var(--text-4); }
.detail { border-top: 1px solid var(--border); background: var(--surface-2); padding: 0.95rem 1rem 1.1rem; display: grid; grid-template-columns: 1fr 14rem; gap: 1.25rem; cursor: default; }
.detail-h { font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 500; margin-bottom: 0.5rem; }
.ticks { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.6rem; color: var(--text-4); border-bottom: 1px solid var(--border); margin-left: 12.5rem; padding-bottom: 0.15rem; }
.lane { display: grid; grid-template-columns: 12rem 1fr; align-items: center; gap: 0.5rem; margin-top: 0.32rem; }
.lane-name { font-size: 0.7rem; font-family: var(--mono); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { position: relative; height: 1.1rem; background: var(--surface-3); border-radius: 3px; }
.span { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; min-width: 2px; display: flex; align-items: center; padding: 0 0.25rem; overflow: hidden; }
.span em { font-family: var(--mono); font-size: 0.56rem; color: #fff; font-style: normal; white-space: nowrap; }
.span.frag { background-image: repeating-linear-gradient(90deg, rgba(243,233,220,0.45) 0 1px, transparent 1px 7px); }
.gapnote { margin-top: 0.7rem; font-size: 0.7rem; color: var(--text-3); }
.spans { font-size: 0.72rem; }
.spans h4 { margin: 0 0 0.45rem; font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); font-weight: 500; }
.spans div { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.26rem 0; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.spans div span:first-child { overflow-wrap: anywhere; }
.spans div span:last-child { font-family: var(--mono); color: var(--text-3); white-space: nowrap; }

@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .j-row { grid-template-columns: 4rem 1fr; }
  .j-badges { grid-column: 2; justify-content: flex-start; }
  .lane { grid-template-columns: 7rem 1fr; }
  .ticks { margin-left: 7.5rem; }
}
