/* Work page: real client projects + demo builds. */

/* filter bar */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.filter { min-height: 40px; padding: 0.5rem 1.05rem; border: 0; border-radius: 999px; cursor: pointer; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 0.92rem;
  box-shadow: inset 0 0 0 1px var(--line-2); transition-property: color, background-color, box-shadow, scale; transition-duration: 0.2s; transition-timing-function: var(--ease-ui); }
.filter:hover { color: var(--ink); }
.filter:active { scale: 0.96; }
.filter[aria-pressed="true"] { color: #00131c; background: var(--cyan); box-shadow: none; }
.filter-count { margin-left: auto; font-size: 0.88rem; color: var(--ink-3); }

[data-cat].is-hidden { display: none; }

/* shared bits */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.chip-pending { color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(47, 216, 255, 0.4); }
.feat-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.6rem; }
.feat-list li { display: flex; gap: 0.7rem; align-items: baseline; color: var(--ink); }
.feat-list li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--cyan); translate: 0 -2px; }
.feat-list.sm { gap: 0.45rem; font-size: 0.95rem; }
.stack { margin-top: 1.5rem; font-size: 0.88rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
/* image outline (white 10% on dark) */
.gallery img, .thumbs img, .proj-media img { outline: 1px solid oklch(1 0 0 / 0.1); outline-offset: -1px; }

/* ===== featured case (MEDMAR) ===== */
.feature { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; padding: clamp(1rem, 2vw, 1.5rem); border-radius: var(--r-xl);
  background: var(--bg-2); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.feature-copy { padding: clamp(0.5rem, 2vw, 1.5rem) clamp(0.5rem, 2vw, 1.5rem) clamp(0.5rem, 2vw, 1.5rem) 0; }
.feature-copy .lede { margin-top: 1rem; font-size: 1.05rem; }
/* concentric: feature radius 32 = browser 18 + padding ~14-24 */
.browser { border-radius: 18px; overflow: hidden; background: #0b0d14; box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px rgba(0, 0, 0, 0.4); }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: #11141d; box-shadow: inset 0 -1px 0 var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a2f3c; }
.browser-bar span { margin-left: 10px; font-size: 0.75rem; color: var(--ink-3); }
.gallery-stage { position: relative; aspect-ratio: 1440 / 900; }
.gallery-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.45s var(--ease-ui); }
.gallery-stage img.is-active { opacity: 1; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-top: 0.75rem; }
.thumbs button { padding: 0; border: 0; cursor: pointer; border-radius: 10px; overflow: hidden; background: none; opacity: 0.55; box-shadow: inset 0 0 0 1px var(--line);
  transition-property: opacity, box-shadow, scale; transition-duration: 0.2s; transition-timing-function: var(--ease-ui); }
.thumbs button:hover { opacity: 0.85; }
.thumbs button:active { scale: 0.96; }
.thumbs button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--cyan); }
.thumbs img { aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover; border-radius: 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1.5rem 0 0; }
.stats div { padding: 0.9rem 1rem; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column-reverse; gap: 0.2rem; }
.stats dt { font-size: 0.8rem; color: var(--ink-3); line-height: 1.3; }
.stats dd { margin: 0; font-size: 2rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }

/* ===== pending (logistics) ===== */
.pending { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: center; padding: clamp(1.25rem, 2.5vw, 2rem); border-radius: var(--r-xl);
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.pending .h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin-bottom: 0.6rem; }
.pending-art svg { width: 100%; height: auto; }
.pending-art .route { stroke: var(--cyan); stroke-width: 2; stroke-dasharray: 0.02 0.02; opacity: 0.8; }
.pending-art circle { fill: var(--bg-3); stroke: var(--ink-3); stroke-width: 2; }
.pending-art .truck { fill: var(--cyan); stroke: none; }

/* ===== project cards ===== */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.proj-grid.two { grid-template-columns: repeat(2, 1fr); }
.proj { display: flex; flex-direction: column; padding: 12px 12px 1.5rem; border-radius: var(--r-lg); background: var(--bg-2); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
  transition-property: translate, box-shadow; transition-duration: 0.35s; transition-timing-function: var(--ease); }
.proj:hover { translate: 0 -4px; box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(47, 216, 255, 0.3); }
.proj > :not(.proj-media) { margin-inline: 0.5rem; }
/* concentric: card 24 = media 12 + padding 12 */
.proj-media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; margin-bottom: 1.25rem; background: #0b0d14; }
.proj-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 12px; transition-property: opacity, scale; transition-duration: 0.5s; transition-timing-function: var(--ease); }
.proj-media .alt { opacity: 0; }
.proj:hover .proj-media img:not(.alt) { opacity: 0; }
.proj:hover .proj-media .alt { opacity: 1; scale: 1.02; }
.proj .h3 { margin-bottom: 0.5rem; }
.proj .muted { font-size: 0.98rem; }
.proj .link-arrow { margin-top: auto; padding-top: 1.25rem; min-height: 40px; }
.proj .feat-list { margin-bottom: 0.25rem; }
.badge { position: absolute; z-index: 1; left: 10px; top: 10px; padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; color: #00131c; background: var(--cyan); }
.next { margin-top: 1rem; padding: 0.75rem 0.9rem; border-radius: 12px; font-size: 0.92rem; color: var(--ink-2); background: var(--cyan-soft); box-shadow: inset 0 0 0 1px rgba(47, 216, 255, 0.2); }
.next b { color: var(--ink); }

/* ===== demos intro ===== */
.demo-intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.demo-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.demo-steps li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: baseline; padding: 1rem 1.2rem; border-radius: var(--r-md); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.demo-steps b { font-size: 1.1rem; font-weight: 900; color: var(--cyan); }
.demo-steps span { color: var(--ink-2); }

@media (max-width: 960px) {
  .feature, .demo-intro { grid-template-columns: 1fr; }
  .feature-copy { padding: 0 0.5rem 0.75rem; }
  .proj-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .proj-grid, .proj-grid.two { grid-template-columns: 1fr; }
  .pending { grid-template-columns: 1fr; }
  .pending-art { max-width: 220px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .stats dd { font-size: 1.6rem; }
  .filter-count { width: 100%; margin-left: 0; }
  .demo-steps li { grid-template-columns: 1fr; gap: 0.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .proj:hover { translate: none; }
  .proj:hover .proj-media .alt { scale: 1; }
}

/* ===== Meridian Twin: live logistics digital twin ===== */
.mt { padding: clamp(1.25rem, 2.6vw, 2.25rem); border-radius: var(--r-xl); background: var(--bg-2); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.mt-head { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: end; }
.mt-head .lede { margin-top: 1rem; font-size: 1.05rem; }
.mt-note { margin-top: 0.9rem; font-size: 0.82rem; color: var(--ink-3); }
.mt-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.mt-feats li { display: grid; gap: 0.2rem; padding: 0.9rem 1rem; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.025); box-shadow: inset 0 0 0 1px var(--line); }
.mt-feats b { font-size: 0.98rem; }
.mt-feats span { font-size: 0.88rem; color: var(--ink-2); line-height: 1.45; text-wrap: pretty; }
.chip-live { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.45); }
.chip-live i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; animation: lx-blink 1.6s ease-in-out infinite; }
@keyframes lx-blink { 50% { opacity: 0.35; } }
.lx-hint { display: flex; align-items: center; gap: 0.6rem; margin: 1.75rem 0 0.9rem; font-size: 0.92rem; color: var(--ink-2); }
.lx-hint svg { width: 20px; height: 20px; color: var(--cyan); flex: none; }
.lx-dots { display: flex; gap: 6px; }
.lx-dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a2f3c; }

/* app shell: concentric with the 32px card (20 + padding) */
.mt-app { --mt-bg: #070a12; border-radius: 20px; overflow: hidden; background: var(--mt-bg); box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 60px rgba(0, 0, 0, 0.45); }
.mt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; min-height: 48px; padding: 0.4rem 0.6rem 0.4rem 14px; background: #0d1019; box-shadow: inset 0 -1px 0 var(--line); font-size: 0.8rem; }
.mt-title { font-weight: 700; color: var(--ink-2); }
.mt-badge { padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; color: #fbbf24; background: rgba(251, 191, 36, 0.1); }
.mt-sim { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.mt-play { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.06); color: var(--ink); cursor: pointer; transition-property: scale, background-color; transition-duration: 0.15s; transition-timing-function: var(--ease-ui); }
.mt-play:hover { background: rgba(255, 255, 255, 0.1); }
.mt-play:active { scale: 0.96; }
.mt-play svg { grid-area: 1 / 1; width: 16px; height: 16px; fill: currentColor; transition-property: opacity, scale, filter; transition-duration: 0.2s; transition-timing-function: cubic-bezier(0.2, 0, 0, 1); }
.mt-play .i-play { translate: 1px 0; } /* optical centre for the triangle */
.mt-play[aria-pressed="true"] .i-play, .mt-play[aria-pressed="false"] .i-pause { opacity: 0; scale: 0.25; filter: blur(4px); }
.mt-speed { display: flex; padding: 3px; gap: 2px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.mt-speed button { min-width: 40px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font: 700 0.76rem var(--font); font-variant-numeric: tabular-nums; cursor: pointer; transition-property: background-color, color, scale; transition-duration: 0.15s; transition-timing-function: var(--ease-ui); }
.mt-speed button:active { scale: 0.96; }
.mt-speed button[aria-pressed="true"] { background: rgba(47, 216, 255, 0.16); color: var(--cyan); }
.mt-clock { min-width: 13.5em; text-align: right; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.mt-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); box-shadow: inset 0 -1px 0 var(--line); }
.mt-kpi { display: grid; gap: 0.15rem; padding: 0.8rem 1.1rem; background: var(--mt-bg); }
.mt-kpi span { font-size: 0.76rem; color: var(--ink-3); }
.mt-kpi b { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mt-kpi.is-warn b { color: #fbbf24; }

.mt-body { display: grid; grid-template-columns: 1.45fr 1fr; }
.mt-map { position: relative; height: 460px; background: radial-gradient(circle at 50% 50%, #0b1730 0%, var(--mt-bg) 62%); box-shadow: inset -1px 0 0 var(--line); }
.mt-map .maplibregl-canvas { outline: none; }
.mt-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 1.5rem; text-align: center; color: var(--ink-3); font-size: 0.9rem; }
.mt-legend { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: flex; gap: 0.8rem; padding: 0.35rem 0.7rem; border-radius: 999px; background: rgba(7, 10, 18, 0.75); backdrop-filter: blur(6px); font-size: 0.75rem; font-weight: 700; color: var(--ink-2); pointer-events: none; }
.mt-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.mt-legend span::before { content: ""; width: 14px; height: 3px; border-radius: 3px; background: var(--c); }
.lg-sea { --c: #2dd4bf; } .lg-air { --c: #fbbf24; } .lg-road { --c: #a78bfa; }
.maplibregl-cooperative-gesture-screen { font: 600 0.9rem var(--font); background: rgba(7, 10, 18, 0.7); }

/* hover popup (MapLibre) */
.mt-pop .maplibregl-popup-content { display: grid; gap: 0.15rem; padding: 0.55rem 0.75rem; border-radius: 10px; background: #111522; color: var(--ink); font: 600 0.76rem/1.35 var(--font); box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 30px rgba(0, 0, 0, 0.5); }
.mt-pop .maplibregl-popup-content b { font-size: 0.84rem; }
.mt-pop .maplibregl-popup-content span { color: var(--ink-2); font-weight: 500; }
.mt-pop .maplibregl-popup-tip { border-top-color: #111522; border-bottom-color: #111522; }

.mt-side { display: flex; flex-direction: column; min-width: 0; }
.mt-filters { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.75rem; box-shadow: inset 0 -1px 0 var(--line); }
.mt-filters button { min-height: 32px; padding: 0.3rem 0.8rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 700 0.8rem var(--font); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-2); transition-property: background-color, color, scale; transition-duration: 0.15s; transition-timing-function: var(--ease-ui); }
.mt-filters button:active { scale: 0.96; }
.mt-filters button[aria-pressed="true"] { background: var(--cyan); color: #00131c; box-shadow: none; }
.mt-list { list-style: none; margin: 0; padding: 0.4rem; overflow: auto; max-height: 404px; display: grid; gap: 2px; align-content: start; }
.mt-row { width: 100%; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "mode id risk" "route route loc" "carrier carrier carrier"; gap: 0.35rem 0.6rem; align-items: center; padding: 0.7rem 0.75rem; border: 0; border-radius: 12px; background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition-property: background-color, box-shadow; transition-duration: 0.15s; transition-timing-function: var(--ease-ui); }
.mt-row:hover, .mt-row.is-active { background: rgba(47, 216, 255, 0.07); }
.mt-row[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(47, 216, 255, 0.5); }
.mt-mode { grid-area: mode; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.7rem; font-weight: 700; color: var(--ink-3); }
.mt-mode::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.mt-id { grid-area: id; font-size: 0.84rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.mt-carrier { grid-area: carrier; font-size: 0.74rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-d-head > span.mt-d-carrier:not(.mt-risk) { color: var(--ink); font-weight: 700; }
.mt-route { grid-area: route; font-size: 0.84rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-risk { grid-area: risk; justify-self: end; padding: 0.12rem 0.5rem; border-radius: 999px; font-size: 0.68rem; font-weight: 700; white-space: nowrap; }
.mt-risk.is-low { color: #34d399; background: rgba(52, 211, 153, 0.12); }
.mt-risk.is-medium { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
.mt-risk.is-high { color: #fb7185; background: rgba(251, 113, 133, 0.13); }
.mt-loc { grid-area: loc; justify-self: end; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.mt-loc::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mt-loc.is-confirmed-scan::before { background: #34d399; }
.mt-loc.is-vehicle-gps::before { background: var(--cyan); }
.mt-loc.is-vehicle-gps-stale::before { background: #fbbf24; }
.mt-loc.is-last-known-facility::before { background: #a78bfa; }
.mt-loc.is-unavailable::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }

.mt-detail { min-height: 150px; padding: 1rem 1.25rem 1.2rem; box-shadow: inset 0 1px 0 var(--line); background: #0a0d16; }
.mt-empty { color: var(--ink-3); font-size: 0.9rem; padding-top: 0.6rem; }
.mt-d-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-bottom: 1rem; }
.mt-d-head b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.mt-d-head > span:not(.mt-risk) { color: var(--ink-2); font-size: 0.88rem; }
.mt-d-head .mt-d-unit { margin-left: auto; color: var(--ink-3); font-size: 0.8rem; }
.mt-d-grid { display: grid; grid-template-columns: 0.9fr 1.2fr 1.1fr; gap: 1.25rem 2rem; font-size: 0.88rem; }
.mt-d-grid p { margin: 0; }
.mt-d-label { font-size: 0.75rem; color: var(--ink-3); margin-bottom: 0.4rem !important; }
.mt-d-label.mt-gap { margin-top: 0.75rem; }
.mt-d-sub { margin-top: 0.4rem !important; font-size: 0.78rem; color: var(--ink-3); line-height: 1.45; text-wrap: pretty; font-variant-numeric: tabular-nums; }
.mt-detail .mt-loc { justify-self: start; font-size: 0.84rem; color: var(--ink); }
/* P10–P90 band with P50 tick and planned marker */
.mt-range { position: relative; height: 10px; margin-top: 0.6rem; border-radius: 6px; background: rgba(255, 255, 255, 0.06); }
.mt-range .r { position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 100%); width: calc((var(--b) - var(--a)) * 100%); border-radius: 6px; background: linear-gradient(90deg, rgba(47, 216, 255, 0.25), rgba(47, 216, 255, 0.55), rgba(47, 216, 255, 0.25)); }
.mt-range .p50 { position: absolute; top: -3px; bottom: -3px; left: calc(var(--m) * 100%); width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--cyan); }
.mt-range .plan { position: absolute; top: -5px; bottom: -5px; left: calc(var(--pl) * 100%); width: 0; border-left: 2px dashed rgba(255, 255, 255, 0.55); }

/* product screenshots: concentric with the 32px card (16 + padding) */
.mt-shots { margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.mt-shots-title { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; }
.mt-shots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.mt-shot { margin: 0; display: grid; gap: 0.75rem; align-content: start; }
.mt-shot button { display: block; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #070a12; cursor: zoom-in; box-shadow: inset 0 0 0 1px var(--line); transition-property: scale, box-shadow; transition-duration: 0.2s; transition-timing-function: var(--ease-ui); }
.mt-shot button:hover { box-shadow: 0 0 0 1px rgba(47, 216, 255, 0.45), 0 18px 40px rgba(0, 0, 0, 0.4); }
.mt-shot button:active { scale: 0.96; }
.mt-shot img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: var(--pos, center); scale: 1.3; transform-origin: var(--pos, center); transition: scale 0.5s var(--ease); }
.mt-shot button:hover img { scale: 1.36; }
.mt-shot button { position: relative; }
.mt-shot button::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.1); pointer-events: none; }
.mt-shot figcaption { display: grid; gap: 0.2rem; }
.mt-shot figcaption b { font-size: 0.98rem; }
.mt-shot figcaption span { font-size: 0.86rem; color: var(--ink-2); line-height: 1.45; text-wrap: pretty; }
.mt-zoom { width: min(1400px, 94vw); max-width: none; max-height: 92vh; padding: 0; border: 0; border-radius: 16px; background: #070a12; overflow: visible; box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 80px rgba(0, 0, 0, 0.6); }
/* the page behind the open viewer must not scroll */
html:has(.mt-zoom[open]) { overflow: hidden; scrollbar-gutter: stable; }
#meridian, #demos { scroll-margin-top: 40px; }
.mt-zoom::backdrop { background: rgba(3, 5, 10, 0.82); backdrop-filter: blur(4px); }
.mt-zoom[open] { animation: zoom-in 0.25s var(--ease-ui); }
@keyframes zoom-in { from { opacity: 0; scale: 0.97; } }
.mt-zoom img { display: block; width: 100%; height: auto; max-height: 92vh; object-fit: contain; border-radius: 16px; }
.mt-zoom-close { position: absolute; top: -52px; right: 0; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(7, 10, 18, 0.8); color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-2); transition: scale 0.15s var(--ease-ui); }
.mt-zoom-close:active { scale: 0.96; }
.mt-zoom-close svg { width: 18px; height: 18px; }

@media (max-width: 960px) {
  .mt-shots-grid { grid-template-columns: 1fr 1fr; }
  .mt-head, .mt-body { grid-template-columns: 1fr; }
  .mt-map { height: 380px; box-shadow: inset 0 -1px 0 var(--line); }
  .mt-list { max-height: 300px; }
  .mt-d-grid { grid-template-columns: 1fr 1fr; }
  .mt-d-grid > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .mt-feats, .mt-shots-grid { grid-template-columns: 1fr; }
  .mt-kpis { grid-template-columns: repeat(3, 1fr); }
  .mt-kpi { padding: 0.6rem 0.75rem; }
  .mt-kpi span { font-size: 0.68rem; }
  .mt-kpi b { font-size: 1.2rem; }
  .mt-kpi:last-child { grid-column: span 2; }
  .mt-title { display: none; }
  .mt-sim { margin-left: 0; width: 100%; }
  .mt-clock { margin-left: auto; min-width: 0; }
  .mt-map { height: 320px; }
  .mt-d-grid { grid-template-columns: 1fr; }
  .mt-d-head .mt-d-unit { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .chip-live i, .mt-zoom[open] { animation: none; }
  .mt-shot button:hover img { scale: 1.3; }
}
/* touch: grow the dense dashboard controls' hit areas without changing their look */
@media (pointer: coarse) {
  .mt-play { flex: none; width: 40px; height: 40px; }
  .mt-speed button, .mt-filters button { position: relative; }
  .mt-speed button::after, .mt-filters button::after { content: ""; position: absolute; inset: -7px 0; }
}
