/* /recycling availability history: island trend card (.rh-*) and the per-machine day and time card (.mh-*). */
.trend { border-top: 1px solid var(--nv-line); padding: 0 16px; }
.trend > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: .85rem; list-style: none; }
.trend > summary::-webkit-details-marker { display: none; }
.trend > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--nv-muted); border-bottom: 2px solid var(--nv-muted); transform: rotate(45deg) translateY(-2px); transition: transform 200ms var(--nv-ease); flex: none; }
.trend[open] > summary::after { transform: rotate(-135deg) translate(-2px, -1px); }
.trend .rh-sum { margin-left: auto; font-weight: 500; font-size: .75rem; color: var(--nv-muted); font-variant-numeric: tabular-nums; }
.trend-body { padding: 2px 0 14px; }

.rh-note, .mh-note { margin: 4px 0; font-size: .8rem; color: var(--nv-muted); line-height: 1.45; }
.rh-note b, .mh-note b { color: var(--nv-ink); }

/* Two headline numbers, each with its change */
.rh-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rh-kpi { background: var(--nv-surface); border: 1px solid var(--nv-line); border-radius: var(--nv-r); padding: 10px 12px; min-width: 0; }
.rh-kpi-label { font-size: .7rem; color: var(--nv-muted); }
.rh-big { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rh-sub { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 4px; }
.rh-when { font-size: .68rem; color: var(--nv-muted); line-height: 1.3; }
.rh-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 5px; border-radius: 999px; font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; border: 1px solid currentColor; }
.rh-chip svg { width: 9px; height: 9px; }
.rh-up { color: var(--nv-ok); background: color-mix(in srgb, var(--nv-ok) 10%, var(--nv-raised)); }
.rh-down { color: #8a5a12; background: color-mix(in srgb, var(--nv-warn) 14%, var(--nv-raised)); }
.rh-flat, .rh-neutral { color: var(--nv-muted); background: var(--nv-raised); }

/* Range switch, in the shared segmented style */
.rh-seg { display: inline-flex; margin: 12px 0 2px; border: 1px solid var(--nv-line); border-radius: var(--nv-r); overflow: hidden; }
.rh-seg-btn { border: 0; background: var(--nv-raised); color: var(--nv-ink); font: inherit; font-size: .75rem; padding: 6px 12px; min-height: 32px; cursor: pointer; transition: background 160ms var(--nv-ease), transform 160ms var(--nv-ease); }
.rh-seg-btn + .rh-seg-btn { border-left: 1px solid var(--nv-line); }
.rh-seg-btn[aria-pressed="true"] { background: var(--nv-accent); color: var(--nv-accent-ink); font-weight: 600; }
.rh-seg-btn:not([aria-pressed="true"]):hover { background: var(--nv-surface); }
.rh-seg-btn:active { transform: scale(.97); }

/* Plot: availability area line above a step line of machine count, one shared scrub rule */
.rh-plot { position: relative; margin-top: 12px; touch-action: pan-y; cursor: crosshair; border-radius: var(--nv-r); outline-offset: 4px; }
.rh-chart { position: relative; }
.rh-chart svg { display: block; width: 100%; overflow: visible; }
.rh-grid { stroke: var(--nv-line); stroke-dasharray: 3 4; }
.rh-ylab { position: absolute; left: 0; font-size: .66rem; color: var(--nv-muted); font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--nv-raised) 80%, transparent); padding: 0 3px 0 0; pointer-events: none; }
.rh-ylab-hi { top: -1px; }
.rh-ylab-lo { bottom: -1px; }
.rh-line { fill: none; stroke: var(--nv-ok); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.rh-area { opacity: 0; }
.rh-drawn .rh-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: rh-draw 900ms var(--nv-ease) both; }
.rh-drawn .rh-area { opacity: 1; animation: rh-fade 900ms var(--nv-ease) both; }
@keyframes rh-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes rh-fade { from { opacity: 0; } to { opacity: 1; } }

.rh-rule { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--nv-ink); opacity: 0; pointer-events: none; transition: opacity 120ms var(--nv-ease), transform 70ms linear; }
.rh-dot { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--nv-ok); border: 2px solid var(--nv-raised); box-shadow: 0 0 0 1.5px var(--nv-ink); opacity: 0; pointer-events: none; transition: opacity 120ms var(--nv-ease), transform 70ms linear; }
.is-scrub .rh-rule, .is-scrub .rh-dot { opacity: 1; }
.rh-plot:focus-visible { outline: 2px solid var(--nv-accent); }

.rh-xaxis { display: flex; justify-content: space-between; margin-top: 4px; font-size: .66rem; color: var(--nv-muted); }
.rh-read { margin-top: 8px; min-height: 2.5em; font-size: .78rem; color: var(--nv-muted); display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-variant-numeric: tabular-nums; }
.rh-read b { color: var(--nv-ink); font-size: .95rem; }
.rh-read-t { margin-left: auto; color: var(--nv-ink); font-weight: 600; }
.rh-foot { margin: 8px 0 0; font-size: .68rem; color: var(--nv-muted); line-height: 1.4; }

/* Loading skeletons: same shapes as the final layout */
.rh-skel, .mh-skel { display: grid; gap: 8px; }
.rh-skel i, .mh-skel i { display: block; border-radius: var(--nv-r); background: linear-gradient(100deg, var(--nv-surface) 30%, #e6e7e9 50%, var(--nv-surface) 70%) 0 0 / 200% 100%; animation: rh-shimmer 1.2s linear infinite; }
.rh-skel i:nth-child(1) { height: 70px; } .rh-skel i:nth-child(2) { height: 96px; } .rh-skel i:nth-child(3) { height: 14px; width: 60%; }
.mh-skel i:nth-child(1) { height: 28px; } .mh-skel i:nth-child(2) { height: 100px; } .mh-skel i:nth-child(3) { height: 12px; width: 70%; }
@keyframes rh-shimmer { to { background-position: -200% 0; } }

/* Machine popup card */
.mh { margin: 10px 0 4px; padding-top: 10px; border-top: 1px solid var(--nv-line); width: min(300px, calc(100vw - 72px)); }
.mh-head { display: flex; align-items: baseline; gap: 8px; }
.mh-head b { font-size: 1.5rem; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.mh-head span { font-size: .72rem; color: var(--nv-muted); line-height: 1.3; }
.mh-label { margin: 10px 0 4px; font-size: .68rem; font-weight: 600; color: var(--nv-muted); }

.mh-bars { display: flex; gap: 2px; height: 30px; align-items: stretch; touch-action: pan-y; cursor: crosshair; border-radius: 3px; }
.mh-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; background: var(--nv-surface); border-radius: 2px; overflow: hidden; transform-origin: bottom; animation: mh-grow 420ms var(--nv-ease) both; transition: transform 140ms var(--nv-ease), box-shadow 140ms var(--nv-ease); }
.mh-bar b { display: block; width: 100%; }
.mh-bar:nth-child(n) { animation-delay: calc(var(--n, 0) * 1ms); }
.mh-bar.is-on { transform: scaleY(1.12); box-shadow: 0 0 0 1.5px var(--nv-ink); position: relative; }

.mh-grid { display: grid; grid-template-columns: 28px repeat(24, 1fr); gap: 2px; touch-action: pan-y; cursor: crosshair; border-radius: 3px; }
.mh-dow { font-size: .62rem; color: var(--nv-muted); align-self: center; line-height: 1; }
.mh-cell { display: block; height: 16px; border-radius: 2px; background: var(--nv-surface); animation: mh-pop 360ms var(--nv-ease) both; animation-delay: calc(var(--i) * 12ms); transition: transform 120ms var(--nv-ease), box-shadow 120ms var(--nv-ease); }
.mh-cell.is-empty { background: repeating-linear-gradient(135deg, var(--nv-surface) 0 3px, #e4e5e8 3px 4px); }
.mh-cell.is-now { box-shadow: inset 0 0 0 1.5px var(--nv-ink); }
.mh-cell.is-on { transform: scale(1.5); position: relative; z-index: 1; box-shadow: 0 0 0 1.5px var(--nv-ink), 0 4px 8px -2px rgba(18, 19, 22, .4); }
.mh-axis { display: grid; grid-template-columns: 28px repeat(4, 1fr); margin-top: 3px; font-size: .62rem; color: var(--nv-muted); }
.mh-axis span:first-child { grid-column: 2; }
.mh-grid:focus-visible, .mh-bars:focus-visible { outline: 2px solid var(--nv-accent); outline-offset: 3px; }
@keyframes mh-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes mh-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.mh-read { margin-top: 8px; min-height: 2.2em; font-size: .75rem; color: var(--nv-ink); line-height: 1.35; }
.mh-read.is-idle { color: var(--nv-muted); font-size: .68rem; }
.mh-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .66rem; color: var(--nv-muted); align-items: center; }
.mh-legend span { display: inline-flex; align-items: center; gap: 4px; }
.mh-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.mh-legend em { font-style: normal; flex-basis: 100%; }

@media (prefers-reduced-motion: reduce) {
    .rh-drawn .rh-line, .rh-drawn .rh-area, .mh-cell, .mh-bar, .rh-skel i, .mh-skel i { animation: none !important; }
    .rh-rule, .rh-dot { transition: none; }
    .rh-area { opacity: 1; }
}

/* Cycles: "once full, emptied in" and "once emptied, full again in". Island tiles carry three "within" rows; machine tiles the latest cases. */
.rc { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--nv-line); }
.rc[hidden], .rt[hidden], .rh-wow[hidden] { display: none; }
.rc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-tile { background: var(--nv-surface); border: 1px solid var(--nv-line); border-radius: var(--nv-r); padding: 10px 12px 10px; min-width: 0; }
.rc-tile .rh-kpi-label { font-size: .72rem; font-weight: 600; color: var(--nv-ink); line-height: 1.25; min-height: 2.5em; }
.rc-wait { font-size: .95rem; letter-spacing: 0; line-height: 1.6; color: var(--nv-muted); font-weight: 500; }
.rc-tile .rh-when { display: block; margin-top: 2px; }
.rc-ok { --rc: var(--nv-ok); }
.rc-warn { --rc: var(--nv-warn); }

.rc-rows { margin-top: 10px; display: grid; gap: 7px; }
.rc-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l v" "t t"; gap: 3px 6px; align-items: baseline; font-size: .7rem; color: var(--nv-muted); font-variant-numeric: tabular-nums; cursor: default; }
.rc-l { grid-area: l; }
.rc-row b { grid-area: v; color: var(--nv-ink); font-size: .8rem; }
.rc-track { grid-area: t; display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--rc) 14%, var(--nv-raised)); overflow: hidden; }
.rc-track i { display: block; height: 100%; width: var(--w); background: var(--rc); border-radius: 3px; transform-origin: left; animation: rc-fill 650ms var(--nv-ease) both; transition: filter 140ms var(--nv-ease); }
.rc-row:hover .rc-track i { filter: brightness(.88); }
.rc-row:hover b { text-decoration: underline; text-decoration-color: var(--rc); text-underline-offset: 3px; }
@keyframes rc-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Machine tile: typical time, then the latest cases as chips */
.mh-cycles { margin: 10px 0 2px; }
.mh-cycles .rc-tile { padding: 8px 10px 8px; }
.mh-cycles .rh-big { font-size: 1.25rem; }
.mh-cycles .rh-big.rc-wait { font-size: .9rem; line-height: 1.4; }
.rc-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; font-size: .64rem; color: var(--nv-muted); }
.rc-recent > span:first-child { width: 100%; }
.rc-chip { padding: 1px 6px; border-radius: 999px; background: var(--nv-raised); border: 1px solid color-mix(in srgb, var(--rc) 55%, var(--nv-line)); color: var(--nv-ink); font-size: .68rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Island: range control, week comparison, time of day */
.rh-ctl { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 2px; }
.rh-ctl .rh-seg { margin: 0; }
.rh-grain { font-size: .68rem; color: var(--nv-muted); }
.rh-pt { fill: var(--nv-raised); stroke: var(--nv-ok); stroke-width: 1.5; }
.rh-wow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 8px 0 0; font-size: .72rem; color: var(--nv-muted); }
.rt { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--nv-line); }
.rt .rh-kpi-label { margin-bottom: 6px; }
/* When machines are working: day type rows x period columns. Headers and cells are all buttons; choosing one filters the cycle tiles. */
.rw { display: grid; grid-template-columns: 58px repeat(4, minmax(0, 1fr)); gap: 3px; }
.rw button { font-family: inherit; border: 0; cursor: pointer; color: var(--nv-ink); min-width: 0; transition: transform 140ms var(--nv-ease), box-shadow 140ms var(--nv-ease), background 140ms var(--nv-ease); }
.rw-corner, .rw-col, .rw-row { background: var(--nv-surface); border-radius: var(--nv-r); min-height: 36px; padding: 4px 6px; font-size: .68rem; font-weight: 600; line-height: 1.2; }
.rw-corner { display: grid; place-items: center; }
.rw-col { display: grid; align-content: center; gap: 1px; text-align: center; }
.rw-col small { font-size: .56rem; font-weight: 500; color: var(--nv-muted); white-space: nowrap; }
.rw-row { text-align: left; }
.rw-corner:hover, .rw-col:hover, .rw-row:hover { background: color-mix(in srgb, var(--nv-accent) 28%, var(--nv-surface)); }
.rw-corner.is-sel, .rw-col.is-sel, .rw-row.is-sel, .rw-col.is-in, .rw-row.is-in { background: var(--nv-accent); color: var(--nv-accent-ink); }
.rw-col.is-sel small, .rw-col.is-in small { color: var(--nv-accent-ink); }
.rw-cell { display: grid; place-items: center; min-height: 36px; border-radius: 4px; font-size: .78rem; font-variant-numeric: tabular-nums; }
.rw-cell b { font-weight: 700; }
.rw-cell.is-empty { background: repeating-linear-gradient(135deg, var(--nv-surface) 0 3px, #e4e5e8 3px 4px); color: var(--nv-muted); cursor: default; }
.rw-cell.is-low { box-shadow: inset 0 0 0 1.5px var(--nv-warn); }
button.rw-cell:hover { transform: scale(1.06); }
button.rw-cell:active, .rw-corner:active, .rw-col:active, .rw-row:active { transform: scale(.97); }
.rw-cell.is-sel { box-shadow: 0 0 0 2px var(--nv-ink), 0 4px 8px -2px rgba(18, 19, 22, .4); transform: scale(1.06); position: relative; z-index: 1; }
.rw button:focus-visible { outline: 2px solid var(--nv-ink); outline-offset: 2px; }
.rc-ctx { margin-bottom: 8px; font-size: .72rem; font-weight: 600; color: var(--nv-ink); }
.rt + .rc { margin-top: 10px; padding-top: 0; border-top: 0; }
.rt-read { margin-top: 6px; min-height: 2.6em; font-size: .75rem; line-height: 1.35; color: var(--nv-muted); font-variant-numeric: tabular-nums; }
.rt-read:not(:empty) { color: var(--nv-ink); }

/* Island: longest working and longest full streaks. Each row is a button that flies to the machine. */
.rk { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--nv-line); }
.rk[hidden] { display: none; }
.rk-list + .rk-list { margin-top: 12px; }
.rk-list .rh-kpi-label { margin-bottom: 4px; font-size: .72rem; font-weight: 600; color: var(--nv-ink); }
.rk ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rk-row { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 12px; grid-template-areas: "n main dur go" ". t t ."; gap: 4px 8px; align-items: center; width: 100%; padding: 8px 6px; border: 0; border-radius: var(--nv-r); background: transparent; font: inherit; color: var(--nv-ink); text-align: left; cursor: pointer; transition: background 140ms var(--nv-ease), transform 140ms var(--nv-ease); }
.rk-row:hover { background: var(--nv-surface); }
.rk-row:active { transform: scale(.985); }
.rk-row:focus-visible { outline: 2px solid var(--nv-ink); outline-offset: 1px; }
.rk-row::after { content: ""; grid-area: go; width: 6px; height: 6px; border-top: 1.5px solid var(--nv-muted); border-right: 1.5px solid var(--nv-muted); transform: rotate(45deg); transition: transform 140ms var(--nv-ease), border-color 140ms var(--nv-ease); }
.rk-row:hover::after { transform: translateX(2px) rotate(45deg); border-color: var(--nv-ink); }
.rk-n { grid-area: n; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--rc); font-size: .7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
li:first-child > .rk-row .rk-n { background: var(--rc); color: #fff; }
.rk-main { grid-area: main; display: grid; min-width: 0; line-height: 1.25; }
.rk-name { font-size: .8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-meta { font-size: .68rem; color: var(--nv-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-dur { grid-area: dur; font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-track { grid-area: t; display: block; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--rc) 14%, var(--nv-raised)); overflow: hidden; }
.rk-track i { display: block; height: 100%; width: var(--w); background: var(--rc); border-radius: 3px; transform-origin: left; animation: rc-fill 650ms var(--nv-ease) both; }
.rk-note { margin: 8px 0 0; font-size: .66rem; color: var(--nv-muted); line-height: 1.35; }
@media (prefers-reduced-motion: reduce) { .rk-track i { animation: none !important; } .rk-row, .rk-row::after { transition: none; } }

/* Machine: performance lines and the day axis */
.mh-perf { display: grid; gap: 5px; margin: 8px 0 2px; }
.mh-perf-row { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--nv-muted); line-height: 1.3; }
.mh-perf-row .rh-chip { flex: none; }
.mh-axis-days { display: flex; justify-content: space-between; margin-top: 3px; font-size: .62rem; color: var(--nv-muted); }

@media (prefers-reduced-motion: reduce) { .rc-track i { animation: none !important; } .rw button { transition: none; } }

/* Plain lines: best time, key, early-data note, and a machine's verdict. */
.rh-best { margin: 10px 0 0; padding: 8px 10px; border-left: 3px solid var(--nv-accent); background: var(--nv-surface); border-radius: 0 var(--nv-r) var(--nv-r) 0; font-size: .78rem; font-weight: 600; line-height: 1.4; color: var(--nv-ink); }
.rh-best[hidden] { display: none; }
.mh-verdict { margin: 0 0 6px; font-size: .9rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.mh-wait { margin: 10px 0 0; font-size: .7rem; }

/* Refinement: nested tiles (a pale tray around a white core, radii kept concentric), hairline borders, soft diffuse lift, a
   staggered rise on load and a nested arrow on tappable rows. Colour, 6px radius and light theme stay as the rest of NAVIG. */
.rh-card-soft, .rh-kpi, .rc-tile { --rh-hair: rgba(18, 19, 22, .08); --rh-spring: cubic-bezier(.32, .72, 0, 1); }
.rh-kpis, .rc-grid { gap: 10px; }
.rh-kpi, .rc-tile { background: var(--nv-raised); border: 1px solid var(--rh-hair); border-radius: 4px; box-shadow: 0 0 0 3px var(--nv-surface), 0 0 0 4px var(--rh-hair); transition: transform 360ms var(--rh-spring), box-shadow 360ms var(--rh-spring); }
.rc-tile:hover { transform: translateY(-1px); box-shadow: 0 0 0 3px var(--nv-surface), 0 0 0 4px var(--rh-hair), 0 10px 18px -14px rgba(18, 19, 22, .18); }
.rh-big { letter-spacing: -.03em; }
.rh-best { border: 1px solid color-mix(in srgb, var(--nv-accent) 45%, var(--nv-raised)); border-left-width: 1px; border-radius: var(--nv-r); background: color-mix(in srgb, var(--nv-accent) 14%, var(--nv-raised)); }
.rt, .rc, .rk { border-top-color: var(--rh-hair, rgba(18, 19, 22, .08)); }

.rk-row::before { content: ""; position: absolute; right: 6px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--nv-surface); transition: background 260ms var(--nv-ease, ease), transform 360ms cubic-bezier(.32, .72, 0, 1); }
.rk-row { grid-template-columns: 22px minmax(0, 1fr) auto 22px; }
.rk-row::after { justify-self: center; margin-right: 2px; position: relative; z-index: 1; }
.rk-row:hover::before { background: var(--nv-ink); transform: scale(1.06); }
.rk-row:hover::after { border-color: #fff; transform: translate(1px, -1px) rotate(45deg); }

@keyframes rh-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
    .rh-kpis, .rh-best, .rh-ctl, .rh-plot, .rh-xaxis, .rh-read, .rh-wow, .rh-meta, .rt, .rc, .rk { animation: rh-rise 640ms cubic-bezier(.16, 1, .3, 1) both; }
    .rh-best { animation-delay: 70ms; }
    .rh-ctl, .rh-plot { animation-delay: 140ms; }
    .rh-xaxis, .rh-read, .rh-wow, .rh-meta { animation-delay: 210ms; }
    .rt { animation-delay: 280ms; }
    .rc { animation-delay: 350ms; }
    .rk { animation-delay: 420ms; }
}

/* Machines-tracked step chart under the share-working chart */
.rh-chart-count { margin-top: 8px; padding-top: 20px; border-top: 1px dashed var(--nv-line); }
.rh-chart-title { position: absolute; left: 0; top: 5px; font-size: .66rem; color: var(--nv-muted); }
.rh-step { fill: none; stroke: var(--nv-ink); stroke-width: 1.5; stroke-linejoin: round; }
.rh-drawn .rh-step { animation: rh-fade 700ms var(--nv-ease) 200ms both; }
.rh-dot-ink { background: var(--nv-ink); width: 8px; height: 8px; left: -4px; top: -4px; }
.rh-chart-count .rh-dot { top: 20px; }
@media (prefers-reduced-motion: reduce) { .rh-drawn .rh-step { animation: none !important; } }

.rc-lead { margin-top: 10px; font-size: .68rem; font-weight: 600; color: var(--nv-muted); }
.rc-lead + .rc-rows { margin-top: 6px; }

/* Quiet help row: an early-data pill and a "How to read this" disclosure replace two paragraphs of small print. */
.rh-meta { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; margin-top: 10px; }
.rh-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--nv-warn) 45%, var(--nv-raised)); background: color-mix(in srgb, var(--nv-warn) 10%, var(--nv-raised)); font-size: .68rem; font-weight: 600; color: var(--nv-ink); }
.rh-help { font-size: .7rem; color: var(--nv-muted); }
.rh-help summary { cursor: pointer; list-style: none; padding: 2px 0; text-decoration: underline; text-decoration-color: var(--rh-hair, rgba(18, 19, 22, .2)); text-underline-offset: 3px; }
.rh-help summary::-webkit-details-marker { display: none; }
.rh-help summary:hover { color: var(--nv-ink); }
.rh-help[open] { flex-basis: 100%; }
.rh-help p { margin: 6px 0 0; line-height: 1.45; }
.rh-help b { color: var(--nv-ink); }
.rk-wait { margin: 2px 0 0; padding: 8px 10px; border-radius: var(--nv-r); background: var(--nv-surface); font-size: .72rem; line-height: 1.4; color: var(--nv-muted); }

/* Best and worst time to go: two labelled chips instead of a sentence. */
.rh-best { display: grid; gap: 6px; }
.rh-best-t { font-size: .72rem; font-weight: 600; color: var(--nv-muted); }
.rh-best-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rh-best-even { font-size: .8rem; font-weight: 600; }
.rh-bt { display: grid; gap: 1px; padding: 6px 8px; border-radius: 4px; background: var(--nv-raised); border: 1px solid var(--rh-hair, rgba(18, 19, 22, .08)); border-left-width: 3px; min-width: 0; }
.rh-bt.is-best { border-left-color: var(--nv-ok); }
.rh-bt.is-worst { border-left-color: var(--nv-warn); }
.rh-bt small { font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--nv-muted); }
.rh-bt b { font-size: .82rem; line-height: 1.2; }
.rh-bt em { font-style: normal; font-size: .7rem; color: var(--nv-muted); font-variant-numeric: tabular-nums; }
.mh-scale { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; }
.mh-scale i { width: 12px; height: 9px; border-radius: 2px; background: rgba(18, 19, 22, .18); }
.mh-scale i:nth-of-type(2) { background: rgba(18, 19, 22, .45); }
.mh-scale i:nth-of-type(3) { background: rgba(18, 19, 22, .8); }
.mh-scale small { font-size: .62rem; }

/* Machine popup (static/js/recycling-popup.js): title, status, address, hours, one quiet row, one action row, then reliability.
   Same look as .sm-link-row in the finder: hairline, white, 36px visual with a 44px hit area, yellow only as a 3px left edge. */
.rp { --rp-hair: rgba(18, 19, 22, .14); --rp-tint: #f7f6f3; --rp-ease: cubic-bezier(.32, .72, 0, 1); width: min(300px, calc(100vw - 72px)); }
.rp h3 { margin: 0 0 6px; font-size: .95rem; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; text-decoration: none; }
.rp-status { display: flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; line-height: 1.3; }
.rp-status .dot { width: 8px; height: 8px; margin: 0; border-radius: 50%; flex: none; }
.rp-line { margin-top: 2px; font-size: .75rem; line-height: 1.4; color: var(--nv-muted); }
.rp, .rp * { box-sizing: border-box; }
.rp-row { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; margin: 8px 0 0; padding: 4px 8px 4px 11px; border: 1px solid var(--rp-hair); border-left: 3px solid var(--nv-accent); border-radius: var(--nv-r); background: #fff; color: var(--nv-ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background 160ms var(--rp-ease), transform 160ms var(--rp-ease); }
.rp-row::after { content: ""; position: absolute; inset: -4px 0; }
.rp-row:hover { background: var(--rp-tint); }
.rp-row:active { transform: scale(.98); }
.rp-row:focus-visible , .rp-actions a:focus-visible { outline: 2px solid var(--nv-ink); outline-offset: 2px; }
.rp-ico { width: 18px; height: 18px; flex: none; fill: currentColor; }
.rp-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.rp-text b { font-size: .875rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-text small { font-size: .75rem; font-weight: 400; color: var(--nv-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-near .rp-text small:first-child { font-size: .6875rem; }
.rp-chev { width: 14px; height: 14px; flex: none; color: var(--nv-muted); transition: transform 160ms var(--rp-ease), color 160ms var(--rp-ease); }
.rp-row:hover .rp-chev { transform: translateX(2px); color: var(--nv-ink); }



/* Reliability inside the popup: same content, tighter, hairline cards without the double ring */
.rp .mh { margin: 6px 0 2px; padding-top: 10px; border-top: 1px solid var(--rp-hair); width: auto; }
.rp .mh-head b { font-size: 1.125rem; }
.rp .mh-head span, .rp .mh-verdict, .rp .mh-perf-row, .rp .mh-note, .rp .mh-read { font-size: .75rem; }
.rp .mh-verdict { font-size: .8125rem; margin-bottom: 4px; }
.rp .rh-big { font-size: 1.125rem; }
.rp .rc-tile, .rp .rh-kpi { box-shadow: none; border-color: var(--rp-hair); background: #fff; }
.rp .rc-tile:hover { transform: none; box-shadow: none; }
.rp .rc-tile .rh-kpi-label { min-height: 0; font-size: .75rem; }
.rp .mh-cycles { margin: 8px 0 0; }
.rp .mh-cycles .rc-tile { padding: 8px 10px; }
.rp .mh-cycles .rh-big { font-size: 1rem; }
.rp .mh-cycles .rh-big.rc-wait { font-size: .75rem; }
.rp .mh-label { font-size: .6875rem; margin: 8px 0 4px; }
.rp .rh-best, .rp .mh-wait { font-size: .75rem; }

@media (prefers-reduced-motion: reduce) {
    .rp-row, .rp-chev, .rp-actions a { transition: none; }
    .rp-row:active, .rp-actions a:active { transform: none; }
    .rp-row:hover .rp-chev { transform: none; }
}

/* Machine page: the same quiet link row as the popup, outside .rp so it carries its own tokens. */
.mp-store-row { --rp-hair: rgba(18, 19, 22, .14); --rp-tint: #f7f6f3; --rp-ease: cubic-bezier(.32, .72, 0, 1); max-width: 420px; margin: 4px 0 14px; }

/* Popup actions: the store page's Directions + Cycle + Bus + MRT, same classes, on one line. Scoped here because this page does not load the finder stylesheet. */
.rp-actions { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; flex-wrap: nowrap; }
.rp-actions a { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 36px; min-height: 36px; gap: 5px; border-radius: var(--nv-r); background: var(--nv-surface); color: var(--nv-ink); font: inherit; font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; flex: none; transition: background 160ms var(--rp-ease), transform 160ms var(--rp-ease); }
.rp-actions a::after { content: ""; position: absolute; inset: -4px 0; }
.rp-actions a:active { transform: scale(.98); }
.rp-actions .fp-route-link { padding: 0 9px; }
.rp-actions .fp-route-link:hover { background: #f5e8bc; }
.rp-actions .fp-primary { flex: 1 1 auto; justify-content: space-between; min-width: 0; padding: 0 4px 0 12px; border-radius: 30px; background: var(--nv-accent); color: var(--nv-accent-ink, var(--nv-ink)); }
.rp-actions .fp-button-arrow { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(23, 21, 14, .09); font-size: 16px; }
.rp-actions .fp-i { width: 1em; height: 1em; fill: currentColor; font-size: 17px; flex: none; }
.rp-actions .fp-button-arrow .fp-i { font-size: 16px; }
