/* Push archive: use the ops console's compact metrics and quiet chart surfaces.
 * Loaded by base.html so direct entry and shared soft navigation use the same CSS. */
.wrap:has(.push-history),
body:has(.push-history) .site-header .inner,
body:has(.push-history) .module-bar-inner { max-width: 1200px; }
.push-history { --ph-panel: var(--panel-bg, var(--bg)); color: var(--text); padding-top: 10px; }
.ph-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.ph-heading h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.3; }
.ph-heading h2 span { margin-left: 12px; color: var(--text-2); font: 400 13px/20px var(--font-sans); }
.ph-heading p, .ph-back { margin: 0; color: var(--text-2); font-size: 13px; }
.ph-back { white-space: nowrap; }
/* No column gap: the divider is exactly 38.2% across the content area. */
.ph-layout { display: grid; grid-template-columns: minmax(0, 38.2fr) minmax(0, 61.8fr); align-items: start; }
.ph-overview { min-width: 0; padding-right: 24px; }
.ph-records { min-width: 0; border-left: 1px solid var(--border); padding-left: 24px; }
.ph-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ph-section-heading h3 { margin: 0; font: 600 14px/22px var(--font-heading); }
.ph-section-heading > span { color: var(--text-2); font-size: 12px; white-space: nowrap; }
.ph-ranges { position: relative; isolation: isolate; display: flex; gap: 4px; margin: 14px 0 16px; padding: 4px; background: var(--input-bg, var(--sunken)); border-radius: 8px; }
.ph-ranges a { position: relative; z-index: 1; flex: 1; padding: 6px 3px; border-radius: 6px; text-align: center; font-size: 12px; color: var(--text-2); }
.ph-ranges a[aria-current] { background: var(--selected-bg, var(--surface)); color: var(--text); box-shadow: var(--shadow); }
.ph-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ph-metric { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--ph-panel); }
.ph-metric > span { color: var(--text-2); font-size: 12px; }
.ph-metric strong { color: var(--text); font-size: 29px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ph-metric small { color: var(--text-2); font-size: 11px; }
.ph-metric strong.ph-danger { color: var(--danger); }
.ph-metric[aria-current] { border-color: var(--text-2); background: var(--selected-bg, var(--oat)); }
.ph-chart-panel { padding: 14px 16px 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--ph-panel); margin-bottom: 16px; }
.ph-chart-panel h3 { font-weight: 500; }
.ph-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 8px 0 6px; color: var(--text-2); font-size: 11px; }
.ph-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.ph-legend > span:last-child { margin-left: auto; }
.ph-legend i { width: 6px; height: 10px; }
.ph-swatch-success, .ph-bar-ok { background: var(--accent); }
.ph-swatch-failed, .ph-bar-failed { background: var(--danger); }
.ph-bars { display: grid; grid-template-columns: repeat(var(--ph-days), minmax(0, 1fr)); gap: 3px; padding-top: 6px; position: relative; }
.ph-bar { position: relative; display: block; min-width: 0; color: var(--text); border-radius: 2px; }
.ph-bar-stack { height: 104px; display: flex; flex-direction: column; justify-content: end; gap: 0; background: var(--input-bg, var(--sunken)); }
.ph-bar-stack i { display: block; flex-shrink: 0; }
.ph-bar-zero { height: 2px; background: var(--border-strong); }
.ph-bar[aria-current] .ph-bar-stack { outline: 2px solid var(--text); outline-offset: 2px; }
.ph-bar:hover .ph-bar-stack { filter: brightness(.9); }
.ph-bar-tick { display: block; position: relative; width: 36px; left: 50%; transform: translateX(-50%); height: 25px; padding-top: 8px; color: var(--text-2); font-size: 10px; text-align: center; white-space: nowrap; }
.ph-bar:first-child .ph-bar-tick { left: 0; transform: none; text-align: left; }
.ph-bar:last-child .ph-bar-tick { left: auto; position: relative; float: right; transform: none; text-align: right; }
.ph-bar-tooltip { display: none; position: absolute; z-index: 5; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 8px 10px; background: var(--tooltip-bg); color: var(--tooltip-fg); border-radius: 6px; font-size: 11px; white-space: nowrap; pointer-events: none; }
.ph-bar:nth-child(-n+3) .ph-bar-tooltip { left: 0; transform: none; }
.ph-bar:nth-last-child(-n+3) .ph-bar-tooltip { left: auto; right: 0; transform: none; }
.ph-bar:hover .ph-bar-tooltip, .ph-bar:focus-visible .ph-bar-tooltip { display: block; }
.ph-chart-foot { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 11px; }
.ph-types .ph-section-heading { margin-bottom: 12px; }
.ph-type { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr) 34px; gap: 12px; align-items: center; padding: 4px; border-radius: 4px; font-size: 12px; }
.ph-type[aria-current] { background: var(--selected-bg, var(--oat)); }
.ph-type-label { color: var(--text-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ph-type-track { display: block; height: 7px; background: var(--input-bg, var(--sunken)); border-radius: 2px; overflow: hidden; }
.ph-type-track i { display: block; height: 100%; background: var(--accent); opacity: .72; }
.ph-type[aria-current] .ph-type-track i { opacity: 1; }
.ph-type-count { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.ph-footnote, .ph-subtle { color: var(--text-2); font-size: 11px; line-height: 1.8; margin: 0; }
.ph-records-heading { margin-bottom: 14px; }
.ph-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 0; }
.ph-filters label { display: flex; flex-direction: column; gap: 7px; min-width: 0; flex: 1 1 110px; }
.ph-filters label.ph-search { flex: 2.5 1 210px; }
.ph-filters label > span { color: var(--text-2); font-size: 11px; }
.ph-filters input[type=search], .ph-filters select { width: 100%; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--input-bg, var(--surface)); color: var(--text); font: 400 12px/20px var(--font-sans); }
.ph-filters input::placeholder { color: var(--text-2); }
.ph-apply { height: 36px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--control-bg, var(--surface)); color: var(--text); font: 400 12px/20px var(--font-sans); cursor: pointer; }
.ph-filter-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 50px; padding: 10px 0; color: var(--text-2); font-size: 11px; }
.ph-chip { padding: 4px 8px; border-radius: 5px; background: var(--selected-bg, var(--oat)); color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.ph-clear { margin-left: auto; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.ph-day { margin-bottom: 26px; }
.ph-day h4 { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--border-strong); font: 600 15px/22px var(--font-heading); }
.ph-day h4 span, .ph-day h4 small { color: var(--text-2); font-size: 11px; font-weight: 400; }
.ph-day h4 small { margin-left: auto; }
.ph-list { list-style: none; padding: 0; margin: 0; }
.ph-record { padding: 16px 0 12px; border-bottom: 1px solid var(--border); min-width: 0; }
.ph-record-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--text-2); }
.ph-record-meta time { font-variant-numeric: tabular-nums; }
.ph-kind { padding: 2px 7px; border-radius: 4px; background: var(--input-bg, var(--sunken)); color: var(--text-2); overflow-wrap: anywhere; }
.ph-failure { color: var(--danger); background: var(--danger-bg); border-radius: 4px; padding: 2px 6px; }
.ph-record-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; margin: 9px 0; font: 400 15px/1.65 var(--font-heading); }
.ph-original summary { display: flex; align-items: center; gap: 6px; width: fit-content; padding: 2px 0; color: var(--text-2); font-size: 11px; list-style: none; cursor: pointer; }
.ph-original summary::-webkit-details-marker { display: none; }
.ph-original[open] summary > span { transform: rotate(180deg); }
.ph-original-body { margin-top: 10px; padding: 14px; background: var(--input-bg, var(--sunken)); border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; }
.ph-original-body p { margin: 0 0 10px; color: var(--text-2); font-size: 11px; }
.ph-original-body pre { margin: 0 0 12px; padding: 0; white-space: pre-wrap; overflow-wrap: anywhere; background: none; color: var(--text); font: 400 12px/1.8 var(--font-body); }
.ph-original-body .ph-original-note { margin-bottom: 0; }
.ph-original-body > a { display: inline-block; margin-top: 12px; text-decoration: underline; text-underline-offset: 3px; }
.ph-empty { padding: 64px 20px; text-align: center; }
.ph-empty h4 { margin: 0 0 12px; font-size: 16px; }
.ph-empty p { color: var(--text-2); font-size: 13px; }
.ph-empty a { font-size: 13px; text-decoration: underline; }
.push-history a:hover { text-decoration: none; }
.ph-type:hover, .ph-ranges a:hover, .ph-apply:hover { background: var(--selected-bg, var(--oat)); }
.ph-back:hover, .ph-clear:hover, .ph-original-body > a:hover { text-decoration: underline !important; }
.push-history :is(a, button, input, select, summary):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
@media (min-width: 1101px) and (min-height: 1100px) {
  .ph-overview-inner { position: sticky; top: calc(var(--header-h) + 24px); }
  .ph-overview { align-self: stretch; }
}
@media (max-width: 1100px) {
  .ph-overview { padding-right: 20px; }
  .ph-records { padding-left: 20px; }
  .ph-metrics { gap: 6px; }
  .ph-metric { padding: 12px 8px; }
  .ph-type { grid-template-columns: minmax(0, 88px) minmax(0, 1fr) 28px; gap: 8px; }
}
@media (max-width: 900px) {
  .ph-layout { grid-template-columns: minmax(0, 1fr); }
  .ph-overview { padding-right: 0; padding-bottom: 26px; }
  .ph-records { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); padding-top: 26px; }
  .ph-heading { margin-bottom: 24px; }
}
@media (max-width: 560px) {
  .ph-heading h2 { font-size: 24px; }
  .ph-filters label.ph-search { flex-basis: 100%; }
  .ph-metric strong { font-size: 26px; }
  .ph-chart-panel { padding-inline: 12px; }
  .ph-record-title { font-size: 14px; }
}


/* Keep the selected plate mounted during local archive updates. */
.ph-range-indicator { display: none; position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 6px; background: var(--selected-bg, var(--surface)); box-shadow: var(--shadow); pointer-events: none; }
.ph-ranges[data-enhanced] .ph-range-indicator { display: block; transition: transform 190ms cubic-bezier(.16, 1, .3, 1), width 190ms cubic-bezier(.16, 1, .3, 1); }
.ph-ranges[data-enhanced] a[aria-current] { background: transparent; box-shadow: none; }
.ph-record-body { overflow-anchor: none; }
.ph-refresh-error { color: var(--danger); font-size: 12px; }
.ph-refresh-error button { margin-left: 8px; color: inherit; text-decoration: underline; border: 0; background: transparent; cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .ph-ranges[data-enhanced] .ph-range-indicator { transition: none; }
}
