/* Map app: demo.html and the landing's hero window. */
.app-map { position: absolute; inset: 0; background: var(--p-surface); }
.app-map .maplibregl-ctrl-attrib { font-size: 11px; }
.app-map .maplibregl-popup-content { font: 400 14px/1.45 var(--font-text); padding: 12px 14px; border-radius: 8px; color: var(--p-ink); }
.app-map .maplibregl-popup-content strong { font-weight: 500; }

/* demo page shell */
body.demo { margin: 0; }
body.demo > .skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; }
body.demo > .skip-link:focus { transform: none; }
.demo-shell { display: grid; grid-template-columns: 400px 1fr; height: 100svh; }
.demo-panel { position: relative; z-index: 2; display: flex; flex-direction: column; gap: var(--s-6); padding: var(--s-6); overflow-y: auto; background: var(--p-bg); border-right: 1px solid color-mix(in oklab, var(--p-ink) 14%, transparent); }
.demo-map { position: relative; }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.demo-back { font-size: 13px; color: var(--p-muted); text-decoration: none; }
.demo-back:hover { color: var(--p-ink); }
.demo-title { font-size: 28px; line-height: 1.05; letter-spacing: -0.03em; margin: 0; }
.demo-sub { font-size: 14px; color: var(--p-muted); margin: -8px 0 0; }

.app-search { position: relative; }
.app-search > .t-label { display: block; margin-bottom: 6px; }
.app-search input { width: 100%; height: 48px; padding: 0 14px; font: 400 16px var(--font-text); color: var(--p-ink); background: var(--p-surface); border: 1px solid transparent; border-radius: var(--r-sm); caret-color: var(--p-action); }
.app-search input:focus-visible { outline: 2px solid var(--p-action); outline-offset: 1px; }
.app-results { position: absolute; z-index: 5; top: 52px; left: 0; right: 0; background: var(--p-bg); border: 1px solid color-mix(in oklab, var(--p-ink) 14%, transparent); border-radius: var(--r-sm); box-shadow: 0 12px 30px rgba(31, 27, 24, 0.12); overflow: hidden; }
.app-result { display: block; width: 100%; padding: 12px 14px; text-align: left; font: 400 15px var(--font-text); color: var(--p-ink); background: none; border: 0; cursor: pointer; }
.app-result:hover, .app-result:focus-visible { background: var(--p-surface); }

.app-current { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); border-top: 1px solid color-mix(in oklab, var(--p-ink) 12%, transparent); padding-top: var(--s-4); }
.app-current__name { font-size: 22px; letter-spacing: -0.02em; margin: 0; }
.app-current__code { font: 400 12px var(--font-mono); color: var(--p-muted); }

.app-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; background: var(--p-surface); border-radius: var(--r-sm); }
.app-switch button { height: 38px; border: 0; border-radius: 4px; background: none; font: 500 14px var(--font-text); color: var(--p-muted); cursor: pointer; }
.app-switch button[aria-pressed="true"] { background: var(--p-bg); color: var(--p-ink); box-shadow: 0 1px 3px rgba(31,27,24,.12); }

.app-stats { display: grid; gap: 8px; }
.app-stat { display: flex; align-items: baseline; gap: 10px; }
.app-stat__v { font-size: 26px; letter-spacing: -0.03em; min-width: 74px; }
.app-stat__l { font-size: 14px; color: var(--p-muted); }

.app-layers { display: grid; gap: 2px; }
.app-group { margin: var(--s-4) 0 4px; color: var(--p-muted); font-family: var(--font-text); }
.app-layer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 2px 8px; border-radius: var(--r-sm); }
.app-layer:hover { background: color-mix(in oklab, var(--p-surface) 70%, transparent); }
.app-info { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--p-muted); cursor: pointer; }
.app-info:hover { color: var(--p-ink); background: var(--p-surface); }
.app-info:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; }
.app-info svg { transition: transform .15s ease; }
.app-info[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .app-info svg { transition: none; } }
.app-toggle { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 8px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.app-toggle:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; }
.app-check { flex: none; width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid color-mix(in oklab, var(--p-ink) 35%, transparent); border-radius: 3px; }
.app-layer.is-on .app-check { background: var(--p-action); border-color: var(--p-action); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 12px; background-position: center; background-repeat: no-repeat; }
.app-layer__name { font-size: 15px; line-height: 1.3; }
.app-count { margin-left: auto; font: 400 12px var(--font-mono); color: var(--p-muted); }
.app-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 2px 0 12px 30px; font: 400 12px var(--font-mono); color: var(--p-muted); }
.app-meta[hidden] { display: none; }
.app-meta a { color: var(--p-action); text-decoration: none; }

.app-legend { position: absolute; z-index: 3; left: 16px; bottom: 16px; width: 210px; padding: 12px 14px; background: color-mix(in oklab, var(--p-bg) 94%, transparent); border: 1px solid color-mix(in oklab, var(--p-ink) 12%, transparent); border-radius: var(--r-sm); backdrop-filter: blur(6px); }
.app-ramp { display: grid; grid-template-columns: repeat(5, 1fr); height: 8px; margin: 8px 0 4px; border-radius: 2px; overflow: hidden; }
.app-ramp__labels { display: flex; justify-content: space-between; font: 400 11px var(--font-mono); color: var(--p-muted); }

@media (max-width: 899px) {
  .demo-shell { display: flex; flex-direction: column; height: auto; }
  .demo-map { order: -1; flex: none; position: sticky; top: 0; z-index: 2; height: clamp(240px, 46svh, 520px); border-bottom: 1px solid color-mix(in oklab, var(--p-ink) 14%, transparent); }
  .demo-panel { position: static; z-index: auto; overflow: visible; border-right: 0; padding-inline: max(var(--s-6), env(safe-area-inset-left)) max(var(--s-6), env(safe-area-inset-right)); padding-bottom: max(var(--s-6), env(safe-area-inset-bottom)); }
  .app-legend { left: 10px; right: 10px; top: 10px; bottom: auto; width: auto; }
  .demo-map .app-keys { display: flex; flex-wrap: wrap; gap: 4px 12px; }
  .demo-back { display: inline-flex; align-items: center; min-height: 44px; }
  .app-toggle { padding-block: 12px; }
  .app-result { min-height: 44px; }
}

.app-keys { display: grid; gap: 6px; margin-top: 10px; }
.app-key { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--p-muted); }
.app-key i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.app-ramp + .app-keys { border-top: 1px solid color-mix(in oklab, var(--p-ink) 12%, transparent); padding-top: 10px; }

@media (max-width: 899px) { .app-info { width: 44px; height: 44px; } }


.app-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.app-preset { height: 32px; padding: 0 11px; border: 1px solid color-mix(in oklab, var(--p-ink) 16%, transparent); border-radius: 999px; background: transparent; font: 500 13px var(--font-text); color: var(--p-muted); cursor: pointer; }
.app-preset:hover { border-color: var(--p-ink); color: var(--p-ink); }
.app-preset.is-on { background: var(--p-surface); border-color: transparent; color: var(--p-ink); }
.app-preset:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; }
@media (max-width: 899px) { .app-preset { height: 44px; padding: 0 14px; } }

.app-notice { margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: var(--p-muted); }
.app-help { margin: 8px 0 0; }
.demo-foot { margin-top: auto; display: grid; gap: 6px; }
.demo-foot a { color: var(--p-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.demo-foot a:hover { color: var(--p-action); }
.app-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.app-chip { height: 28px; padding: 0 10px; border: 1px solid color-mix(in oklab, var(--p-ink) 16%, transparent); border-radius: 999px; background: none; font: 500 12px var(--font-text); color: var(--p-muted); cursor: pointer; }
.app-chip:hover { color: var(--p-ink); border-color: var(--p-ink); }
.app-chip.is-on { background: var(--p-ink); color: var(--p-bg); border-color: var(--p-ink); }
.app-chip:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; }
@media (max-width: 899px) {
  .app-chip { height: 44px; }
}
@media (min-width: 640px) and (max-width: 899px) {
  .app-legend { right: auto; width: 320px; }
}
@media (max-width: 639px) {
  .app-legend { display: grid; grid-template-columns: auto minmax(110px, 1fr); align-items: center; column-gap: 12px; padding: 8px 10px; }
  .app-legend > .t-label { grid-column: 1; margin: 0; }
  .app-legend > .app-ramp { grid-column: 2; margin: 0; }
  .app-legend > .app-ramp__labels { grid-column: 2; }
  .app-chips, .app-keys { grid-column: 1 / -1; }
  .app-chips { margin-top: 8px; padding-bottom: 2px; }
  .app-chip { flex: none; white-space: nowrap; }
  .app-ramp + .app-keys { border-top: 0; padding-top: 6px; }
}
/* a phone on its side is a small desktop: the panel keeps its own scroll column */
@media (max-width: 899px) and (max-height: 500px) and (orientation: landscape) {
  .demo-shell { display: grid; grid-template-columns: minmax(280px, 34%) minmax(0, 1fr); height: 100svh; }
  .demo-panel { order: 0; overflow-y: auto; z-index: 2; border-right: 1px solid color-mix(in oklab, var(--p-ink) 14%, transparent); padding: var(--s-5) max(var(--s-5), env(safe-area-inset-right)) max(var(--s-5), env(safe-area-inset-bottom)) max(var(--s-5), env(safe-area-inset-left)); }
  .demo-map { order: 0; position: relative; height: auto; min-height: 0; z-index: auto; border-bottom: 0; }
  .app-legend { display: block; left: 12px; bottom: 12px; top: auto; right: auto; width: 210px; }
}

/* hardening: data that runs long, loads that fail, narrow screens */
.app-map .maplibregl-popup-content { overflow-wrap: anywhere; }
.app-map--fallback { display: grid; place-items: center; padding: var(--s-6); text-align: center; }
.app-map--fallback p { max-width: 34ch; margin: 0; font-size: 14px; line-height: 1.45; color: var(--p-muted); }
.app-results { max-height: min(60svh, 360px); overflow-y: auto; }
.app-field { position: relative; }
.app-results { top: calc(100% + 4px); }
.app-result { overflow-wrap: anywhere; }
.app-result.is-active { background: var(--p-surface); }
.app-empty { padding: 12px 14px; font: 400 14px/1.4 var(--font-text); color: var(--p-muted); }
.app-toggle { min-width: 0; }
.app-layer__name { overflow-wrap: anywhere; }
.app-count { white-space: nowrap; }
.app-current { min-width: 0; }
.app-current__name { min-width: 0; overflow-wrap: anywhere; }
.app-meta { overflow-wrap: anywhere; }
.app-legend { max-height: calc(100% - 32px); overflow-y: auto; }
.app-legend:empty { display: none; }
.demo-panel, .app-results, .app-legend { scrollbar-width: thin; scrollbar-color: color-mix(in oklab, var(--p-ink) 22%, transparent) transparent; }
.app-notice a, .app-retry { color: var(--p-action); }
.app-retry { margin-left: 2px; padding: 0; border: 0; background: none; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.app-retry:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; border-radius: 2px; }
@media (max-width: 899px) { .app-legend { max-height: calc(clamp(240px, 46svh, 520px) - 20px); } }

/* motion: feedback only (Operate). A control answers in 120ms; a change of content settles in
   app.js (Web Animations) and the map's layers fade in. Nothing runs on load. */
.demo-back, .app-preset, .app-chip, .app-result, .app-info, .app-retry, .app-meta a, .demo-foot a {
  transition: color 120ms var(--ease), background-color 120ms var(--ease), border-color 120ms var(--ease);
}
.app-layer { transition: background-color 120ms var(--ease); }
.app-check { transition: background-color 120ms var(--ease), border-color 120ms var(--ease); }
.app-search input { transition: border-color 120ms var(--ease), background-color 120ms var(--ease); }
.app-search input:hover { border-color: color-mix(in oklab, var(--p-ink) 22%, transparent); }
/* the panel says it is working, then the rows replace the notice (4 cycles, ~5.6 s: a load lasts less) */
.app-loading { animation: app-pulse 1.4s var(--ease) 4; }
@keyframes app-pulse { 50% { opacity: .5; } }
/* a popup on a feature arrives; MapLibre owns its transform, so only the opacity moves */
.maplibregl-popup { animation: app-fade 140ms var(--ease); }
@keyframes app-fade { from { opacity: 0; } }
@media (max-width: 899px) {
  .app-legend { left: 8px; right: 8px; top: 8px; bottom: auto; width: auto; padding: 8px 10px; display: block; max-height: none; }
  .app-ramp__labels { display: none; }
  .demo-map .app-keys { display: none; }
  .app-chips { flex-wrap: wrap; }
  .app-chip { flex: none; height: 32px; }
}
/* the kit turns every transition off under reduced motion; keep the state changes
   of this app (colour, border, background) visible, and only the motion instant */
@media (prefers-reduced-motion: reduce) {
  .app-layer, .app-toggle, .app-info, .app-chip, .app-preset, .app-result, .app-retry { transition-duration: 120ms !important; }
  .app-info svg { transition-duration: 0ms !important; }
}

/* measurements inspector: right column on desktop, bottom sheet on the phone */
.measure-panel { grid-column: 3; min-width: 0; padding: 20px 20px 28px; background: var(--p-bg); border-left: 1px solid color-mix(in oklab, var(--p-ink) 14%, transparent); overflow-y: auto; }
body.has-measure .demo-shell { grid-template-columns: 400px minmax(0, 1fr) 400px; }
.mp-head { position: relative; padding-right: 36px; margin-bottom: 10px; }
.mp-kicker { margin: 0 0 2px; font-size: 12px; color: var(--p-muted); }
.mp-head h2 { margin: 0; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; }
.mp-head h2:focus { outline: none; }
.mp-close { position: absolute; top: -4px; right: -6px; width: 36px; height: 36px; border: 0; border-radius: 4px; background: none; font-size: 24px; line-height: 1; color: var(--p-muted); cursor: pointer; }
.mp-close:hover { color: var(--p-ink); background: var(--p-surface); }
.mp-close:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; }
.mp-scps { margin: 0 0 14px; font-size: 12px; line-height: 1.5; color: var(--p-muted); }
.mp-verdict { display: grid; gap: 2px; padding: 12px 14px; margin-bottom: 14px; background: var(--p-surface); border-left: 3px solid var(--p-action); }
.mp-verdict.is-over { border-left-color: var(--p-ink); }
.mp-verdict__value { font-size: 26px; letter-spacing: -0.02em; }
.mp-verdict__label { font-size: 12px; color: var(--p-muted); }
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.mp-chip { height: 32px; padding: 0 11px; border: 1px solid color-mix(in oklab, var(--p-ink) 16%, transparent); border-radius: 999px; background: none; font: 500 12px var(--font-text); color: var(--p-muted); cursor: pointer; }
.mp-chip:hover { color: var(--p-ink); border-color: var(--p-ink); }
.mp-chip.is-on { background: var(--p-ink); border-color: var(--p-ink); color: var(--p-bg); }
.mp-chip:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; }
.mp-chart { margin: 6px 0 4px; }
.mp-chart svg { display: block; width: 100%; height: auto; }
.mp-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.mp-table caption { text-align: left; padding-bottom: 6px; color: var(--p-muted); font-size: 12px; }
.mp-table th, .mp-table td { text-align: left; padding: 7px 0; border-bottom: 1px solid color-mix(in oklab, var(--p-ink) 10%, transparent); }
.mp-table th { font-weight: 500; color: var(--p-muted); }
.mp-table thead th { text-align: right; }
.mp-table thead th:first-child { text-align: left; }
.mp-table td { text-align: right; font-family: var(--font-mono); font-size: 12px; }
.mp-table td:first-child { text-align: left; }
.mp-history td:first-child { font-family: var(--font-text); }
.mp-loading { display: flex; align-items: center; gap: 10px; padding: 28px 0; font-size: 13px; color: var(--p-muted); }
.mp-spin { width: 16px; height: 16px; border: 2px solid color-mix(in oklab, var(--p-ink) 25%, transparent); border-top-color: var(--p-action); border-radius: 50%; animation: mp-spin .8s linear infinite; }
@keyframes mp-spin { to { transform: rotate(360deg); } }
.mp-empty { font-size: 13px; color: var(--p-muted); }
@media (prefers-reduced-motion: reduce) { .mp-spin { animation: none; border-top-color: inherit; border-style: dashed; } }

/* varco: photogram, KPIs and the passage strip */
.mp-frame { margin: 0 0 6px; }
.mp-frame svg { display: block; width: 100%; height: auto; border-radius: 6px; }
.mp-frame figcaption { margin-top: 6px; font: 400 11px/1.4 var(--font-mono); color: var(--p-muted); }
.mp-note { margin: 0 0 14px; font-size: 11px; color: var(--p-muted); }
.mp-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 6px; }
.mp-kpis > div { padding: 10px; background: var(--p-surface); border-radius: 6px; }
.mp-kpis b { display: block; font-size: 20px; line-height: 1.1; letter-spacing: -0.02em; }
.mp-kpis span { display: block; margin-top: 4px; font-size: 11px; line-height: 1.35; color: var(--p-muted); }
.mp-sub { margin: 18px 0 8px; font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--p-muted); }
.mp-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mp-strip button { padding: 0; border: 1px solid color-mix(in oklab, var(--p-ink) 16%, transparent); border-radius: 4px; background: none; overflow: hidden; cursor: pointer; text-align: left; }
.mp-strip button.is-on { border-color: var(--p-action); box-shadow: 0 0 0 1px var(--p-action); }
.mp-strip button:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; }
.mp-strip svg { display: block; width: 100%; height: auto; }
.mp-strip span { display: flex; align-items: center; gap: 4px; padding: 3px 5px; font: 400 10px/1.3 var(--font-mono); color: var(--p-muted); }
.mp-strip i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
@media (max-width: 899px) {
  body.has-measure .demo-shell { grid-template-columns: 1fr; }
  .measure-panel { position: fixed; left: 0; right: 0; bottom: 0; height: 70svh; z-index: 30; border-left: 0; border-top: 1px solid color-mix(in oklab, var(--p-ink) 14%, transparent); border-radius: 12px 12px 0 0; box-shadow: 0 -12px 30px rgba(31, 27, 24, 0.15); }
}

.mp-head h2:focus { outline: none; }


/* view switch and the comune report */
.app-views { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.app-view { height: 34px; padding: 0 10px; border: 1px solid color-mix(in oklab, var(--p-ink) 16%, transparent); border-radius: 999px; background: none; font: 500 12px var(--font-text); color: var(--p-muted); cursor: pointer; }
.app-view:hover:not(:disabled) { color: var(--p-ink); border-color: var(--p-ink); }
.app-view.is-on { background: var(--p-ink); border-color: var(--p-ink); color: var(--p-bg); }
.app-view:disabled { opacity: .4; cursor: default; }
.app-view:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; }

body.has-report .demo-shell { display: none; }

.report { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: var(--p-bg); padding: 22px clamp(18px, 4vw, 56px) 48px; }
.report-wrap { width: min(100%, 1120px); margin-inline: auto; }
.report-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.report-back { height: 38px; padding: 0 14px; border: 1px solid color-mix(in oklab, var(--p-ink) 18%, transparent); border-radius: 999px; background: none; font: 500 12px var(--font-text); color: var(--p-ink); cursor: pointer; }
.report-back:hover { background: var(--p-surface); }
.report-back:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; }
.report-kicker { margin: 0; font-size: 12px; color: var(--p-muted); }
.report-title { margin: 0 0 8px; font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.02em; line-height: 1.1; }
.report-title:focus { outline: none; }
.report .mp-scps { margin-bottom: 22px; }
.report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.report-kpis > div { padding: 14px 16px; background: var(--p-surface); border-radius: 6px; }
.report-kpis b { display: block; font-size: 22px; letter-spacing: -0.02em; line-height: 1.15; }
.report-kpis span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--p-muted); }
.report-block { margin-top: 18px; }
.report-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.report-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.report-key { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid color-mix(in oklab, var(--p-ink) 16%, transparent); border-radius: 999px; background: none; font: 500 12px var(--font-text); color: var(--p-ink); cursor: pointer; }
.report-key i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.report-key.is-off { opacity: .45; text-decoration: line-through; }
.report-key:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; }
.report-chart svg { display: block; width: 100%; height: auto; }
.report-chart.is-hover [data-line] { opacity: .16; }
.report-chart.is-hover [data-line].is-on { opacity: 1; stroke-width: 2.6; }
.report-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13px; }
.report-table caption { text-align: left; padding-bottom: 6px; color: var(--p-muted); font-size: 12px; }
.report-table th, .report-table td { padding: 8px 0; border-bottom: 1px solid color-mix(in oklab, var(--p-ink) 10%, transparent); text-align: left; }
.report-table td { text-align: right; font-family: var(--font-mono); font-size: 12px; }
.report-table thead th { text-align: right; font-weight: 500; color: var(--p-muted); }
.report-table thead th:first-child { text-align: left; }
.report-table tbody th { font-weight: 500; }
.report-table tr.is-off { opacity: .45; }
.report-open { text-align: right; }
.report-open-btn { height: 30px; padding: 0 10px; border: 1px solid color-mix(in oklab, var(--p-ink) 16%, transparent); border-radius: 999px; background: none; font: 500 11px var(--font-text); color: var(--p-ink); cursor: pointer; white-space: nowrap; }
.report-open-btn:hover { background: var(--p-surface); }
.report-open-btn:focus-visible { outline: 2px solid var(--p-action); outline-offset: 2px; }
@media (max-width: 899px) {
  .report { padding: 16px 16px 40px; }
  .report-kpis { grid-template-columns: 1fr 1fr; }
  .report-top { flex-wrap: wrap; }
}

/* the hover tip on the charts: the nearest point, its value and its time */
.mp-chart, .report-chart { position: relative; }
.chart-tip { position: absolute; z-index: 4; transform: translate(-50%, -118%); padding: 6px 8px; border-radius: 5px; background: var(--p-ink); color: var(--p-bg); font: 400 11px/1.35 var(--font-mono); pointer-events: none; white-space: nowrap; }
.chart-tip b { display: block; font-weight: 500; font-size: 12px; }
.chart-tip span { display: block; color: color-mix(in oklab, var(--p-bg) 72%, transparent); }

.report-layers { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 14px; }
