/* report.css to prebuild Tailwinda — klasy, których nie było przy budowaniu,
   nie istnieją. Nowe warianty dopisuj tutaj jako własne klasy. */

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --default-font-family: var(--font-sans);
  --default-mono-font-family: var(--font-mono);

  /* skala tekstu z prebuildu jest o krok za drobna na długie partie raportu */
  --text-xs: .8125rem;
  --text-sm: .9375rem;

  --ok: oklch(50% .13 162);
  --warn: oklch(52% .13 72);
  --bad: oklch(55% .21 20);
  --info: oklch(50% .1 220);

  --elev-1: 0 1px 2px oklch(24% .03 258/.05), 0 1px 3px oklch(24% .03 258/.06);
  --elev-2: 0 1px 2px oklch(24% .03 258/.06), 0 12px 32px -12px oklch(24% .03 258/.22);
  --am-card-alpha: 100%;
  --am-rail-line: color-mix(in oklab, var(--muted-foreground) 32%, transparent);
}

.dark, .navy {
  --ok: oklch(78% .15 160);
  --warn: oklch(84% .17 84);
  --bad: oklch(72% .19 18);
  --info: oklch(78% .13 215);

  --elev-1: 0 1px 2px oklch(0% 0 0/.34), inset 0 1px 0 oklch(100% 0 0/.03);
  --elev-2: 0 2px 4px oklch(0% 0 0/.36), 0 16px 40px -14px oklch(0% 0 0/.7), inset 0 1px 0 oklch(100% 0 0/.04);
  --am-card-alpha: 100%;
}

html, body {
  font-family: var(--font-sans);
}

.am-lbl {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: .004em;
  text-transform: none;
  color: var(--muted-foreground);
}
.am-lbl-sm { font-size: 13px; }

.am-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.am-vin {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .045em;
}

.am-d1 { font-size: 40px; line-height: 1.04; font-weight: 600; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.am-d2 { font-size: 28px; line-height: 1.14; font-weight: 600; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.am-p  { font-size: 16px; line-height: 1.65; margin: 0; color: var(--muted-foreground); text-wrap: pretty; }

@media (max-width: 640px) {
  .am-d1 { font-size: 27px; letter-spacing: -.024em; }
  .am-d2 { font-size: 21px; letter-spacing: -.02em; }
}

.am-t-ok   { --tone: var(--ok); }
.am-t-warn { --tone: var(--warn); }
.am-t-bad  { --tone: var(--bad); }
.am-t-info { --tone: var(--info); }
.am-t-pri  { --tone: var(--primary); }
.am-t-mut  { --tone: var(--muted-foreground); }

.am-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--tone);
  background: color-mix(in oklab, var(--tone) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone) 34%, transparent);
}
.am-chip .n {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.am-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--tone); flex: 0 0 auto; }

.am-hdr-in { height: 60px; }

.am-rail {
  position: sticky;
  top: 60px;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 88%, transparent);
  backdrop-filter: blur(14px);
}
.am-rail-in {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: thin;
}
.am-rail-i {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 26ch;
  padding: 0 14px;
  height: 46px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s, background-color .15s;
}
.am-rail-i:hover {
  color: var(--foreground);
  background: color-mix(in oklab, var(--secondary) 50%, transparent);
}
.am-rail-i .am-dot { width: 5px; height: 5px; }
.am-rail-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-rail-i.is-on { color: var(--foreground); border-bottom-color: var(--primary); }

.am-rail-box { position: relative; }
.am-rail-ar {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: none;
  width: 42px;
  align-items: center;
  padding: 0;
  border: 0;
  color: var(--muted-foreground);
  cursor: pointer;
}
.am-rail-ar.is-on { display: flex; }
.am-rail-ar:hover { color: var(--foreground); }
.am-rail-ar-l {
  left: 0;
  justify-content: flex-start;
  padding-left: 3px;
  background: linear-gradient(to right,
    color-mix(in oklab, var(--background) 96%, transparent) 0,
    color-mix(in oklab, var(--background) 96%, transparent) 55%,
    transparent 100%);
}
.am-rail-ar-r {
  right: 0;
  justify-content: flex-end;
  padding-right: 3px;
  background: linear-gradient(to left,
    color-mix(in oklab, var(--background) 96%, transparent) 0,
    color-mix(in oklab, var(--background) 96%, transparent) 55%,
    transparent 100%);
}

@media (max-width: 640px) {
  .am-rail-i { height: 48px; padding: 0 13px; }
}

.am-sec-h {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.am-sec-h-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.am-sec-h .am-p { max-width: 74ch; }

.am-tile-go {
  color: var(--muted-foreground);
  opacity: .42;
  transform: translateX(-2px);
  transition: opacity .15s, transform .15s;
}

@media (max-width: 640px) {

}

.am-tl-wrap { max-width: 760px; margin-left: auto; margin-right: auto; }

.am-tl-panel {
  position: relative;
  margin-top: 22px;
}
.am-tl { position: relative; list-style: none; margin: 0; padding: 0; }

.am-tl-track, .am-tl-fill {
  position: absolute;
  left: 134px;
  margin-left: -.5px;
  top: 20px;
  bottom: 20px;
  width: 1px;
  pointer-events: none;
}
.am-tl-track {
  width: 2px;
  background-image: linear-gradient(var(--am-rail-line) 55%, transparent 0);
  background-size: 2px 7px;
  background-repeat: repeat-y;
}
.am-tl-fill {
  width: 2px;
  transform-origin: top;
  transform: scaleY(0);
  background: linear-gradient(to bottom, var(--primary), oklch(86.5% .127 207.078), var(--primary));
  box-shadow: 0 0 12px 1px var(--primary);
}
/* rok: pasmo rozdzielające. Kreska biegnie przez całą szerokość, rok siedzi nad rynną dat,
   więc daty pod nim czyta się już bez powtarzania rocznika w każdym wierszu.
   Pasmo nie ma tła, żeby szyna i pasek postępu szły przez przełom lat bez dziury. */
.am-tl-yr { list-style: none; }
.am-tl-y {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  padding: 18px 0 16px;
}
.am-tl-y::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}
.am-tl-y .n {
  position: relative;
  justify-self: end;
  padding: 0 12px 0 14px;
  background: var(--background);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
}

/* miesiąc: jeden stempel na grupę, wyrównany do pierwszego zdarzenia */
.am-tl-ms { list-style: none; margin: 0; padding: 0; }
.am-tl-mg { list-style: none; display: grid; grid-template-columns: 110px 48px minmax(0, 1fr); }
.am-tl-mg + .am-tl-mg { margin-top: 20px; }
.am-tl-m {
  grid-column: 1;
  align-self: start;
  padding: 14px 14px 0 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
  white-space: nowrap;
}
.am-tl-es {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: subgrid;
  row-gap: 20px;
  column-gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.am-tl-i { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; }
/* przy filtrze puste grupy znikają razem z wpisami */
.am-tl-mg:not(:has(.am-tl-i:not(.is-off))),
.am-tl-yr:not(:has(.am-tl-i:not(.is-off))) { display: none; }
.am-tl-mid { position: relative; display: flex; justify-content: center; }
.am-tl-node {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--acc, var(--primary));
  background: var(--card);
  box-shadow:
    inset 0 0 0 1px color-mix(in oklab, var(--acc, var(--primary)) 30%, transparent),
    0 0 0 5px var(--background),
    0 6px 16px -6px color-mix(in oklab, var(--acc, var(--primary)) 55%, transparent);
}
.am-tl-c { padding: 0 0 0 20px; min-width: 0; }

/* karta zdarzenia: nagłówek z chipem i chevronem, szczegóły w rozwinięciu */
.am-tl-card {
  /* ramka jak kafle sekcji (rounded-xl border-border bg-card/50), ale bez backdrop-blur:
     kart jest ~260, a rozmycie tła liczy się przy każdym przewinięciu */
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: color-mix(in oklab, var(--card) 50%, transparent);
}
.am-tl-sum {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px 4px 14px;
  list-style: none;
  cursor: default;
}
details.am-tl-card > summary.am-tl-sum { cursor: pointer; }
details.am-tl-card > summary.am-tl-sum::-webkit-details-marker { display: none; }
details.am-tl-card > summary.am-tl-sum:hover .am-tl-ttl { color: var(--primary); }
.am-tl-h { display: grid; gap: 2px; min-width: 0; flex: 0 1 auto; margin-right: auto; }
.am-tl-ttl { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--foreground); overflow-wrap: break-word; }
.am-tl-sub { font-size: 14px; line-height: 1.4; color: var(--muted-foreground); }
/* kraj przy zmianie rejestru: linijka nad treścią jak etykieta, więc nie przesuwa tytułu ani kolumn km */
.am-tl-cc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
/* plik flagi to kwadrat 24 px z przezroczystymi pasami — cover wycina sam prostokąt flagi */
.am-tl-cc img {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent);
}
/* stałe slotu po prawej: bez nich chip skacze między wierszami */
.am-tl-t { display: flex; align-items: center; gap: 6px; min-width: 0; }
.am-tl-x { flex: 0 0 auto; display: inline-flex; color: var(--ok); transition: transform .15s; }
.am-tl-delta {
  flex: 0 0 auto;
  min-width: 96px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.am-tl-delta.is-bad { color: var(--bad); font-weight: 600; }
.am-tl-delta.is-empty { visibility: hidden; }
details.am-tl-card[open] > summary .am-tl-x { transform: rotate(90deg); }
.am-tl-body { padding: 0 2px 12px 14px; }
.am-tl-body > *:first-child { margin-top: 8px; }
/* niemieckie złożenia w liście czynności: anywhere, bo break-word nie zmienia min-content */
.am-tl-body li { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
/* slot o stałej szerokości: tekst pozycji z ikoną i z kropką zaczyna się w tej samej kolumnie */
.am-tl-st { flex: 0 0 16px; height: 1.5em; display: inline-flex; align-items: center; justify-content: center; color: var(--tone); }

@media (max-width: 640px) {
  .am-tl-mg { grid-template-columns: 70px 44px minmax(0, 1fr); }
  .am-tl-y { grid-template-columns: 70px minmax(0, 1fr); }
  .am-tl-y .n { padding: 0 10px; font-size: 14px; }
  .am-tl-m { padding-right: 8px; }
  .am-tl-track, .am-tl-fill { left: 92px; }
  .am-tl-c { padding-left: 12px; }
  .am-tl-sum { padding: 12px 13px; gap: 8px 10px; flex-wrap: wrap; }
  /* stałe slotu po prawej mają sens tylko tam, gdzie jest je z czym wyrównać */
  .am-tl-h { flex: 1 1 100%; margin-right: 0; }
  .am-tl-delta { min-width: 0; text-align: left; }
  .am-tl-delta.is-empty { display: none; }
  .am-tl-body { padding: 0 13px 12px; }
}

.am-filters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding-top: 16px; }
.am-fbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  box-shadow: inset 0 0 0 1px var(--border);
  background: none;
  border: 0;
  cursor: pointer;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.am-fbtn:hover { color: var(--foreground); background: color-mix(in oklab, var(--secondary) 60%, transparent); }
.am-fbtn .n {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: color-mix(in oklab, var(--muted-foreground) 80%, transparent);
}
.am-fbtn.is-on { color: var(--primary-foreground); background: var(--primary); box-shadow: none; }
.am-fbtn.is-on .n { color: color-mix(in oklab, var(--primary-foreground) 76%, transparent); }
.am-tl-i.is-off { display: none; }

@media (max-width: 640px) {
  .am-fbtn { height: 44px; flex: 0 0 auto; }
  /* zawijanie robiło z paska filtrów dwa–trzy rzędy; jeden rząd z przewijaniem w bok */
  .am-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .am-filters::-webkit-scrollbar { display: none; }
}

.am-odo-svg .ax, .am-chart .ax { font-family: var(--font-mono); font-size: 11.5px; fill: var(--chart-axis); }
.am-odo-svg .ax-r, .am-chart .ax-r { text-anchor: end; }
.am-odo-svg .ax-c, .am-chart .ax-c { text-anchor: middle; }
.am-odo-svg .gl, .am-chart .gl { stroke: var(--chart-grid); fill: none; }
.am-odo-svg .gl-d, .am-chart .gl-d { stroke-dasharray: 3 5; }
.am-odo-svg .gl-v, .am-chart .gl-v { stroke-opacity: .5; }
.am-odo-svg .gs0, .am-chart .gs0 { stop-color: var(--primary); stop-opacity: .26; }
.am-odo-svg .gs1, .am-chart .gs1 { stop-color: var(--primary); stop-opacity: 0; }
.am-odo-svg .area, .am-chart .area { fill: url(#odoGrad); stroke: none; }
.am-odo-svg .line, .am-chart .line { fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.am-odo-svg .line-bad, .am-chart .line-bad { fill: none; stroke: var(--bad); stroke-width: 3.4; stroke-linecap: round; }
.am-odo-svg .drop, .am-chart .drop { stroke: var(--bad); stroke-width: 1.4; stroke-dasharray: 2 3; }
.am-odo-svg .badl, .am-chart .badl { font-family: var(--font-mono); font-size: 12px; font-weight: 600; fill: var(--bad); }
.am-odo-svg .dot, .am-chart .dot { fill: var(--dot-bg); stroke: var(--primary); stroke-width: 2.4; }
.am-odo-svg .dot-bad, .am-chart .dot-bad { stroke: var(--bad); }
.am-odo-svg .hit, .am-chart .hit { fill: transparent; }
.am-odo-svg .tipbg, .am-chart .tipbg { fill: var(--card); stroke: var(--border); }
.am-odo-svg .tipt, .am-chart .tipt { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; fill: var(--chart-ink); }
.am-odo-svg .tip, .am-chart .tip { opacity: 0; transition: opacity .12s; pointer-events: none; }
.am-odo-svg .pt:hover .tip, .am-odo-svg .pt:focus-within .tip, .am-chart .pt:hover .tip, .am-chart .pt:focus-within .tip { opacity: 1; }

/* dwa warianty proporcji: szeroki na desktop, wyższy na telefon */
.am-odo-svg--sm { display: none; }
@media (max-width: 640px) {
  .am-odo-svg--lg { display: none; }
  .am-odo-svg--sm { display: block; }
}
/* wariant wysoki renderuje się w skali ~0.66, więc tekst i kreski trzeba podnieść,
   inaczej opisy osi schodzą do ~7 px */
.am-odo-svg--sm .ax { font-size: 15px; }
.am-odo-svg--sm .tipt { font-size: 16px; }
.am-odo-svg--sm .badl { font-size: 15px; }
.am-odo-svg--sm .line { stroke-width: 3.3; }
.am-odo-svg--sm .line-bad { stroke-width: 5; }
.am-odo-svg--sm .dot { stroke-width: 3.6; r: 6; }
.am-odo-svg--sm .drop { stroke-width: 2; }

/* wykres rysuje się przy wejściu w kadr; pathLength="1" pozwala animować bez znajomości długości */
.am-odo-svg .line, .am-odo-svg .line-bad { stroke-dasharray: 1; stroke-dashoffset: 1; }
.am-odo-svg .area, .am-odo-svg .odo-dot, .am-odo-svg .tipt,
.am-odo-svg .badl, .am-odo-svg .drop { opacity: 0; }
[data-reveal].in .am-odo-svg .line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.15s cubic-bezier(.33, 1, .68, 1) .15s; }
[data-reveal].in .am-odo-svg .area { opacity: 1; transition: opacity .8s ease-out .35s; }
[data-reveal].in .am-odo-svg .odo-dot { opacity: 1; transition: opacity .3s ease-out calc(.4s + var(--d, 0) * .07s); }
[data-reveal].in .am-odo-svg .line-bad { stroke-dashoffset: 0; transition: stroke-dashoffset .5s ease-out 1s; }
[data-reveal].in .am-odo-svg .drop { opacity: 1; transition: opacity .4s ease-out 1.3s; }
[data-reveal].in .am-odo-svg .badl,
[data-reveal].in .am-odo-svg .tipt { opacity: 1; transition: opacity .45s ease-out 1.4s; }

@media (prefers-reduced-motion: reduce) {
  .am-odo-svg .line, .am-odo-svg .line-bad { stroke-dashoffset: 0; }
  .am-odo-svg .area, .am-odo-svg .odo-dot, .am-odo-svg .tipt,
  .am-odo-svg .badl, .am-odo-svg .drop { opacity: 1; }
  [data-reveal].in .am-odo-svg * { transition: none; }
}
@media print {
  .am-odo-svg .line, .am-odo-svg .line-bad { stroke-dashoffset: 0; }
  .am-odo-svg .area, .am-odo-svg .odo-dot, .am-odo-svg .tipt,
  .am-odo-svg .badl, .am-odo-svg .drop { opacity: 1; }
  .am-odo-svg--sm { display: none; }
  .am-odo-svg--lg { display: block; }
}

.am-stat { padding: 16px 18px; display: grid; gap: 4px; border-bottom: 1px solid var(--border); }
.am-stat:last-child { border-bottom: 0; }
.am-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--foreground);
}
.am-num .u { font-size: 14px; font-weight: 500; color: var(--muted-foreground); letter-spacing: 0; }
.am-bar { height: 6px; border-radius: 999px; background: var(--gauge-track); overflow: hidden; margin-top: 8px; position: relative; }
.am-bar i { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--tone); display: block; }

.am-tbl { width: 100%; border-collapse: collapse; }
.am-tbl th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-foreground);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.am-tbl td { padding: 9px 16px; border-bottom: 1px solid color-mix(in oklab, var(--border) 62%, transparent); font-size: 14px; }
.am-tbl tr:last-child td { border-bottom: 0; }
.am-tbl .n { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.am-tbl tr.is-bad td { background: color-mix(in oklab, var(--bad) 7%, transparent); }
.am-tbl tr.is-bad .n { color: var(--bad); font-weight: 600; }

.am-view-l {
  display: block;
  margin-top: 9px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.am-hdr-in { gap: 20px; }

.am-rule { height: 1px; background: var(--border); border: 0; margin: 18px 0; }

.am-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin: 0; }
@media (min-width: 640px) { .am-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.am-specs dt { margin: 0; display: flex; align-items: center; gap: 6px; }
.am-specs dd { margin: 4px 0 0; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--foreground); }

@media (min-width: 640px) { .am-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.am-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 0;
}
@media (min-width: 640px) { .am-foot { flex-direction: row; align-items: center; } }

.am-rail-i .am-mono { font-size: 12.5px; }
.am-foot .am-mono { font-size: 12.5px; }

.am-chip-acc {
  --tone: var(--acc, var(--muted-foreground));
  font-size: 12.5px;
  padding: 3px 9px;
}
.am-tl-c .am-lbl { color: var(--muted-foreground); }
.am-tl-c dl { margin-top: 7px; }

.am-sec { padding: 40px 0; }
.am-sec + .am-sec { border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent); }
.am-sec-last { padding-bottom: 40px; }
@media (max-width: 640px) { .am-sec { padding: 28px 0; } }

@media print {
  .am-co2, .am-co2-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .am-co2 { break-inside: avoid; }
  .am-rail { display: none !important; }
  .am-filters { display: none !important; }
  .am-tile-go { display: none !important; }
  .am-tl-i.is-off { display: grid !important; }
  .am-sec { padding: 28px 0; }
  .am-sec + .am-sec { border-top: 0; }
  .am-tl-i { break-inside: avoid; }
  .am-tl-fill { transform: scaleY(1) !important; box-shadow: none; }
}

.am-stack { display: grid; gap: 14px; }

.am-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--elev-2);
}

.am-veh { display: grid; gap: 24px; padding: 26px 24px; align-items: center; }
@media (min-width: 1024px) { .am-veh { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.am-vin-tag { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; }
.am-vin-tag .tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  padding: 3px 7px;
  border-radius: 6px;
  color: var(--muted-foreground);
  box-shadow: inset 0 0 0 1px var(--border);
}
.am-vin-tag .val { font-family: var(--font-mono); font-size: 14px; font-weight: 500; letter-spacing: .045em; color: var(--foreground); }
.am-vin-tag button { color: var(--muted-foreground); display: flex; transition: color .15s; }
.am-vin-tag button:hover { color: var(--foreground); }

.am-veh-img { position: relative; display: flex; align-items: center; justify-content: center; }
.am-veh-img::before {
  content: "";
  position: absolute;
  inset: -6% -4%;
  border-radius: 999px;
  background: radial-gradient(ellipse at 50% 55%, color-mix(in oklab, var(--primary) 16%, transparent) 0%, transparent 68%);
  pointer-events: none;
}
.am-veh-img img { position: relative; max-height: 214px; width: auto; object-fit: contain; filter: drop-shadow(0 26px 30px oklch(0% 0 0 / .5)); }

.am-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .am-tiles { grid-template-columns: minmax(0, 1fr); } }
.am-tile .am-lbl, .am-tile-v { overflow-wrap: break-word; }
@media (min-width: 900px) { .am-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.am-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--elev-1);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.am-tile:hover { border-color: color-mix(in oklab, var(--tone) 45%, var(--border)); box-shadow: var(--elev-2); }
.am-tile:hover .am-tile-go { opacity: 1; transform: translateX(2px); }
.am-tile-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--tone);
  background: color-mix(in oklab, var(--tone) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone) 32%, transparent);
}
.am-tile-v { font-size: 15px; font-weight: 600; color: var(--tone); margin-top: 2px; }

.am-ord {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--muted-foreground);
  flex: 0 0 auto;
}
.am-rail-i.is-on .am-ord { color: var(--primary); }
.am-rail-i .am-mono {
  padding: 1px 6px;
  border-radius: 5px;
  background: color-mix(in oklab, var(--tone, var(--muted-foreground)) 14%, transparent);
}
.am-rail-i.is-on { border-bottom-width: 3px; }

.am-tile { align-items: flex-start; }
.am-tile-ic {
  width: 44px;
  height: 44px;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
.am-tile-ic img { width: 40px; height: 40px; object-fit: contain; }
.am-tile-v { font-size: 14.5px; font-weight: 600; line-height: 1.45; margin-top: 3px; }
.am-tiles { align-items: stretch; }
.am-tile .am-tile-go { align-self: center; }

.am-tbl tr.is-current td { background: color-mix(in oklab, var(--primary) 9%, transparent); }
.am-nowrap { white-space: nowrap; }

.am-veh-solo { grid-template-columns: minmax(0, 1fr) !important; }
.am-veh-solo .am-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .am-veh-solo .am-specs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.am-rail-in { scrollbar-width: none; -ms-overflow-style: none; }
.am-rail-in::-webkit-scrollbar { width: 0; height: 0; display: none; }

.am-ai-h { display: flex; align-items: center; gap: 7px; }
.am-ai-p { margin: 8px 0 0; font-size: 15px; line-height: 1.65; color: var(--foreground); text-wrap: pretty; }
.am-ai-cols { display: grid; gap: 18px 28px; margin-top: 16px; }
@media (min-width: 768px) { .am-ai-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.am-ai-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.am-ai-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; line-height: 1.5; color: var(--foreground); }
.am-ai-list li svg { color: var(--tone); margin-top: 2px; }

.am-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 18px; }
.am-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.am-tab:hover { color: var(--foreground); background: color-mix(in oklab, var(--secondary) 55%, transparent); }
.am-tab.is-on {
  color: var(--foreground);
  background: color-mix(in oklab, var(--secondary) 80%, transparent);
  box-shadow: inset 0 0 0 1.5px var(--primary);
}
@media (max-width: 640px) { .am-tab { height: 44px; } }

.am-sem { max-width: 900px; margin: 22px auto 0; }

.am-sem-p { margin-bottom: 26px; }
.am-sem-pt {
    margin: 0 0 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
}
.am-sem-e {
    padding: 16px 18px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in oklab, var(--card) 60%, transparent);
}
.am-sem-et { margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--foreground); }
.am-sem-s.has-sep { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); }
.am-sem-st { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--foreground); }
.am-sem-note {
    margin: 22px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in oklab, var(--foreground) 4%, transparent);
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--muted-foreground);
}
.am-sem-body { font-size: 14px; line-height: 1.7; color: var(--foreground); }
.am-sem-body p { margin: 0 0 12px; }
.am-sem-body strong { font-weight: 600; }
.am-sem-body a { color: var(--primary); text-decoration: underline; }

.am-sem-body ul, .am-sem-body ol { margin: 12px 0; padding-left: 22px; }
.am-sem-body ul { list-style: disc; }
.am-sem-body ol { list-style: decimal; }
.am-sem-body li::marker { color: var(--muted-foreground); }
.am-sem-body li { margin-bottom: 4px; }
.am-sem-body h2 { font-size: 18px; font-weight: 600; margin: 18px 0 8px; }
.am-sem-body h3 { font-size: 15px; font-weight: 600; margin: 14px 0 6px; }

@media print { .am-tabs { display: none !important; } [data-panel] { display: block !important; } }

:root {
    --sev-minor: oklch(62% .13 80);
    --sev-moderate: oklch(60% .19 48);
    --sev-major: oklch(55% .23 26);
    --sev-unknown: oklch(58% .02 260);
}
.dark {
    --sev-minor: oklch(88% .16 92);
    --sev-moderate: oklch(83% .2 52);
    --sev-major: oklch(74% .24 26);
    --sev-unknown: oklch(72% .02 260);
}
[data-sev="minor"] { --sev: var(--sev-minor); }
[data-sev="moderate"] { --sev: var(--sev-moderate); }
[data-sev="major"] { --sev: var(--sev-major); }
[data-sev="unknown"] { --sev: var(--sev-unknown); }

.sevchip-unknown {
    color: var(--sev-unknown);
    background: color-mix(in oklch, var(--sev-unknown) 14%, transparent);
    --tw-ring-color: color-mix(in oklch, var(--sev-unknown) 42%, transparent);
}

.am-sev-dot {
    display: inline-block;
    border-radius: 9999px;
    background: var(--sev);
}
.am-sev-swatch {
    display: inline-block;
    border-radius: .125rem;
    background: color-mix(in oklch, var(--sev) 42%, transparent);
    box-shadow: inset 0 0 0 1px var(--sev);
}

#car-stage .zone {
    position: absolute;
    border: 2px solid var(--sev);
    border-radius: 9px;

    background: radial-gradient(ellipse at center,
        color-mix(in oklab, var(--sev) 6%, transparent) 35%,
        color-mix(in oklab, var(--sev) 32%, transparent) 100%);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--sev) 50%, transparent),
        0 0 16px color-mix(in oklab, var(--sev) 55%, transparent);
}


#car-stage .zone[data-sev="unknown"] {
    border-style: dashed;
    background: repeating-linear-gradient(45deg,
        color-mix(in oklab, var(--sev) 38%, transparent) 0 3px,
        transparent 3px 9px);
}

#car-stage .zone.am-cv-face {
    inset: -9px;
    border: 2px solid var(--sev);
    border-radius: 12px;
    background: none;
    box-shadow: 0 0 14px color-mix(in oklab, var(--sev) 40%, transparent);
}
#car-stage .zone.am-cv-face[data-sev="unknown"] { border-style: dashed; }
#car-stage .zone.on {
    opacity: 1 !important;
}
#car-stage .zone:not(.on) {
    opacity: 0 !important;
}
html:not(.js) #car-stage .zone.z-all {
    opacity: 1 !important;
}

#car-stage .zone[data-area="front-left"] { left: 3%; top: 12%; width: 33%; height: 78%; }
#car-stage .zone[data-area="side-left"],
#car-stage .zone[data-area="left"] { left: 35%; top: 12%; width: 31%; height: 78%; }
#car-stage .zone[data-area="rear-left"] { left: 65%; top: 12%; width: 32%; height: 78%; }
#car-stage .zone[data-area="rear-right"] { left: 3%; top: 12%; width: 32%; height: 78%; }
#car-stage .zone[data-area="side-right"],
#car-stage .zone[data-area="right"] { left: 35%; top: 12%; width: 31%; height: 78%; }
#car-stage .zone[data-area="front-right"] { left: 64%; top: 12%; width: 33%; height: 78%; }

:root {
    --nc-excellent: oklch(58% .13 195);
    --nc-good: oklch(55% .17 245);
    --nc-fair: oklch(62% .13 85);
    --nc-poor: oklch(55% .23 25);
}
.dark {
    --nc-excellent: oklch(78% .15 195);
    --nc-good: oklch(70% .18 245);
    --nc-fair: oklch(85% .12 90);
    --nc-poor: oklch(62% .24 25);
}
[data-nc="excellent"] { --nc-tone: var(--nc-excellent); }
[data-nc="good"] { --nc-tone: var(--nc-good); }
[data-nc="fair"] { --nc-tone: var(--nc-fair); }
[data-nc="poor"] { --nc-tone: var(--nc-poor); }
.am-nc-score { color: var(--nc-tone); }
.am-nc-star { color: var(--nc-tone); }
.am-nc-star-off { color: var(--star-empty); }

.am-chart .area-cv { fill: url(#cvGrad); stroke: none; }
.am-chart .bar { fill: color-mix(in oklab, var(--primary) 38%, transparent); }
.am-chart .bar-cur { fill: var(--primary); }

.am-inp {
    width: 100%;
    padding: .5rem .7rem;
    font-size: .875rem;
    color: var(--foreground);
    background: color-mix(in oklab, var(--card) 70%, transparent);
    border: 1px solid var(--border);
    border-radius: .5rem;
    outline: none;
}
.am-inp:focus {
    border-color: color-mix(in oklab, var(--primary) 55%, transparent);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 22%, transparent);
}
.am-inp:disabled { opacity: .6; }

.am-inp:user-invalid { border-color: color-mix(in oklab, var(--bad) 55%, transparent); }

.am-form-full { grid-column: 1 / -1; }
.am-form-btn:disabled { opacity: .6; cursor: default; }

.am-spin {
    display: inline-block;
    width: 1.75rem;
    height: 1.75rem;
    border: 2.5px solid color-mix(in oklab, var(--primary) 25%, transparent);
    border-top-color: var(--primary);
    border-radius: 9999px;
    animation: am-spin 720ms linear infinite;
}
@keyframes am-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .am-spin { animation-duration: 2.4s; } }

#cv-pending[data-stalled] .am-spin { animation: none; opacity: .35; }

.am-stat-ic {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
}
.am-stat-ic img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
@media (max-width: 480px) {
    .am-stat-ic { width: 38px; height: 38px; }
}

.am-recall-body > * + * { margin-top: 18px; }
.am-recall-txt {
    max-width: min(86ch, 100%);
    font-size: 14px;
    line-height: 1.75;
    letter-spacing: .012em;
    color: var(--foreground);
}

.am-dg { margin: 0; display: flex; justify-content: center; }
.am-dg-svg { width: 100%; max-width: 228px; height: auto; display: block; }

.am-dg-svg .dg-outline {
    fill: color-mix(in oklab, var(--foreground) 4%, transparent);
    stroke: color-mix(in oklab, var(--foreground) 34%, transparent);
    stroke-width: 1.5;
}
.am-dg-svg .dg-wheel rect { fill: color-mix(in oklab, var(--foreground) 34%, transparent); }

.am-dg-svg .dg-z {
    fill: color-mix(in oklab, var(--foreground) 6%, transparent);
    stroke: color-mix(in oklab, var(--foreground) 16%, transparent);
    stroke-width: .9;
    transition: fill .18s ease, stroke .18s ease;
}
.am-dg-svg .dg-z[data-sev] { stroke: var(--sev); stroke-width: 1.4; }
.am-dg-svg .dg-z[data-sev="minor"] { fill: color-mix(in oklab, var(--sev-minor) 45%, transparent); }
.am-dg-svg .dg-z[data-sev="moderate"] { fill: color-mix(in oklab, var(--sev-moderate) 50%, transparent); }
.am-dg-svg .dg-z[data-sev="major"] { fill: color-mix(in oklab, var(--sev-major) 55%, transparent); }

.am-dg-svg .dg-z[data-sev="unknown"] { fill: url(#dgHatch); }
.am-dg-svg .dg-hatch { stroke: var(--sev-unknown); stroke-width: 2; }

@media (prefers-reduced-motion: reduce) { .am-dg-svg .dg-z { transition: none; } }

.am-dmg-list { margin: 0; padding: 0; list-style: none; }
.am-dmg-row {
    display: grid;
    grid-template-columns: auto minmax(6.5rem, auto) 1fr auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .14s ease;
}
.am-dmg-row:hover { background: color-mix(in oklab, var(--foreground) 6%, transparent); }
.am-dmg-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.am-dmg-date { font-size: 14px; font-weight: 600; color: var(--foreground); }
.am-dmg-place { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--muted-foreground); }
.am-dmg-amt { font-family: var(--font-mono); font-size: 13.5px; color: var(--muted-foreground); white-space: nowrap; }

.am-dmg-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) {
    .am-dmg-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}
.am-dmg-tabplace { max-width: 13rem; }

.dmg-tab.on {
    color: var(--foreground);
    background: color-mix(in oklab, var(--sev) 12%, var(--card));
    border-color: color-mix(in oklab, var(--sev) 55%, transparent);
    box-shadow: 0 1px 2px color-mix(in oklab, var(--sev) 22%, transparent),
        0 6px 16px color-mix(in oklab, var(--sev) 16%, transparent);
    transform: none;
}
.dmg-tab.on .am-lbl { opacity: 1; color: var(--muted-foreground); }
.dmg-tab-all.on .dmg-tab-ic {
    background: color-mix(in oklab, var(--sev) 16%, var(--card));
    color: var(--sev);
}
.am-dmg-listbox { padding-top: 16px; }
/* AF-8854: kwota jest tym, czego szuka czytelnik — bez pigułki i tła, za to czytelnie */
.am-dmg-amount {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--foreground);
}

@media (min-width: 1024px) {
  .am-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.am-span-2 { grid-column: 1 / -1; }
.am-own { margin: 0; padding: 0; list-style: none; }
.am-own-i {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
}
.am-own-i:first-child { border-top: 0; }
.am-own-n {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted-foreground);
    background: color-mix(in oklab, var(--foreground) 7%, transparent);
}
.am-own-i.is-last .am-own-n {
    color: var(--primary);
    background: color-mix(in oklab, var(--primary) 13%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--primary) 32%, transparent);
}
.am-own-b { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; }
.am-own-t { font-size: 14px; font-weight: 600; color: var(--foreground); }
.am-own-p { font-size: 13px; color: var(--muted-foreground); }
.am-own-d { flex: 0 0 auto; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; }

.am-nc-stars { min-height: 76px; }
.am-nc-pic { display: block; width: 44px; height: 44px; }
.am-nc-pic img { width: 100%; height: 100%; object-fit: contain; }

@media screen {
    html.js .am-more:not(.is-open) .is-more { display: none; }
}
.am-more-foot {
    display: flex;
    justify-content: center;
    padding: 0 16px 16px;
}
.am-tbl + .am-more-foot { padding-top: 12px; border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
.am-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: color-mix(in oklab, var(--card) 60%, transparent);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.am-more-btn:hover { color: var(--foreground); border-color: color-mix(in oklab, var(--primary) 45%, transparent); }
.am-more-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media print {
    .am-more-foot { display: none !important; }
}

.am-nm-found { margin: 0 0 4px; padding: 0; list-style: none; }
.am-nm-found > li {
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid color-mix(in oklab, var(--bad) 32%, transparent);
    border-radius: 12px;
    background: color-mix(in oklab, var(--bad) 8%, transparent);
}
.am-nm-ft { font-size: 14px; font-weight: 600; color: var(--foreground); }
.am-nm-fd { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted-foreground); }
.am-nm-clean { margin: 0; padding: 0; list-style: none; }
.am-nm-clean > li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    font-size: 13.5px;
    color: color-mix(in oklab, var(--foreground) 78%, transparent);
}
.am-more-foot-tight { padding: 10px 0 0; }

/* AF-8854: sama strzałka nie mówiła, że wiersz się rozwija — opisowy przycisk zamiast niej */
.am-rc-more {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted-foreground);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: color .15s, box-shadow .15s;
}
.recall:hover .am-rc-more { color: var(--foreground); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--primary) 45%, transparent); }
.recall:not([open]) .am-rc-more-hide, .recall[open] .am-rc-more-show { display: none; }

.am-co2 { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.am-co2-r { display: flex; align-items: center; gap: 8px; }
.am-co2-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: var(--co2-w);
    min-width: 46px;
    height: 22px;
    padding-right: 8px;
    background: var(--co2);
    border-radius: 3px 11px 11px 3px;
    opacity: .42;
    transition: opacity .18s ease;
}
.am-co2-cls { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: #10151c; }
.am-co2-rng { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-foreground); white-space: nowrap; }
.am-co2-r.is-on .am-co2-bar { opacity: 1; box-shadow: 0 0 0 2px color-mix(in oklab, var(--co2) 45%, transparent); }
.am-co2-r.is-on .am-co2-rng { color: var(--foreground); font-weight: 600; }
.am-co2-now {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--foreground);
    white-space: nowrap;
}

/* drobny druk: celowo poniżej skali reszty raportu */
.am-disc { font-size: 13px; line-height: 1.7; color: var(--muted-foreground); }
.am-disc p { margin: 0 0 8px; text-align: justify; }
.am-disc ul, .am-disc ol { margin: 8px 0; padding-left: 20px; }
.am-disc ul { list-style: disc; }
.am-disc ol { list-style: decimal; }
.am-disc li { margin-bottom: 4px; }
.am-disc a { color: var(--primary); text-decoration: underline; }
.am-disc strong { font-weight: 600; color: color-mix(in oklab, var(--foreground) 85%, transparent); }

.am-clause-wrap { padding-top: 24px; }
.am-clause {
    border-color: color-mix(in oklab, var(--warn) 40%, transparent);
    background: color-mix(in oklab, var(--warn) 6%, transparent);
}

.am-gen {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    font-size: 13.5px;
    color: var(--muted-foreground);
}
.am-gen b { font-weight: 600; color: var(--foreground); }

.am-odo-one {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 20px 22px;
    padding: 26px 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card);
}
.am-odo-one-ic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    color: var(--primary);
    background: color-mix(in oklab, var(--primary) 12%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--primary) 26%, transparent);
}
.am-odo-one-v { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.am-odo-one-km {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 34px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    color: var(--foreground);
}
.am-odo-one-km span { font-size: 15px; font-weight: 500; color: var(--muted-foreground); }
.am-odo-one-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 34px;
    margin: 0;
    padding-top: 18px;
    border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
}
.am-odo-one-meta dt {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}
.am-odo-one-meta dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; color: var(--foreground); }
.am-odo-one-c { display: flex; align-items: center; gap: 7px; }
.am-odo-one-desc { flex: 1 1 100%; max-width: 46ch; }
.am-odo-desc { order: 1; flex: 1 0 100%; min-width: 0; }
.am-odo-dv {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* trzy opisane kolumny; liczby wyrównane do prawej wewnątrz stałej szerokości, żeby "km" stało w pionie */
.am-odo-t { --odo-cols: minmax(150px, 1fr) minmax(130px, 1fr) minmax(150px, 1.2fr); }
.am-odo-th, .am-odo-r {
  display: grid;
  grid-template-columns: var(--odo-cols);
  align-items: center;
  gap: 0 20px;
  padding: 0 20px;
}
.am-odo-th {
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted-foreground);
}
.am-odo-t ul { list-style: none; margin: 0; padding: 0; }
.am-odo-r { min-height: 48px; padding-top: 9px; padding-bottom: 9px; }
.am-odo-r + .am-odo-r { border-top: 1px solid color-mix(in oklab, var(--border) 55%, transparent); }
.am-odo-rd { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.am-odo-rdt { min-width: 0; font-size: 15px; color: var(--foreground); }
.am-odo-rdt small { display: block; font-size: 13px; line-height: 1.4; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-odo-rv, .am-odo-rc {
  font-family: var(--font-mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
  white-space: nowrap;
}
.am-odo-rv b, .am-odo-rc b { display: inline-block; min-width: 7ch; text-align: right; font-weight: 600; }
.am-odo-rc { color: var(--muted-foreground); }
.am-odo-rc b { color: var(--foreground); }
.am-odo-r.is-bad { background: color-mix(in oklab, var(--bad) 7%, transparent); box-shadow: inset 3px 0 0 var(--bad); }
.am-odo-r.is-bad .am-odo-rc, .am-odo-r.is-bad .am-odo-rc b { color: var(--bad); }

@media (max-width: 720px) {
  .am-odo-t { --odo-cols: minmax(0, 1fr) auto; }
  .am-odo-th span:last-child { display: none; }
  .am-odo-th, .am-odo-r { gap: 0 14px; padding-left: 14px; padding-right: 14px; }
  .am-odo-r { row-gap: 2px; }
  .am-odo-rc { grid-column: 2; font-size: 13.5px; }
  .am-odo-rc b { color: var(--muted-foreground); font-weight: 500; }
  .am-odo-rv b, .am-odo-rc b { min-width: 0; }
}
}
@media (min-width: 640px) {
    .am-odo-desc { order: 0; flex: 0 1 auto; max-width: 18rem; }
}
@media (min-width: 768px) {
    .am-odo-one { grid-template-columns: auto auto minmax(0, 1fr); }
    .am-odo-one-meta {
        grid-column: 3;
        grid-row: 1;
        padding-top: 0;
        padding-left: 28px;
        border-top: 0;
        border-left: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
    }
}

svg.am-ico-plain path[opacity=".2"] { display: none; }

.am-gate { padding: 48px 0 64px; }
.am-gate-head { display: grid; justify-items: center; gap: 8px; margin-bottom: 32px; text-align: center; }
.am-gate-veh { margin-top: 12px; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; color: var(--foreground); }
.am-gate-head .am-vin-tag { margin-top: 2px; }
.am-gate-box { max-width: 560px; margin: 0 auto; padding: 32px 28px; }
.am-gate-ic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 16px;
    color: var(--tone);
    background: color-mix(in oklab, var(--tone) 12%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone) 30%, transparent);
}
.am-gate-p { margin-top: 10px; }
.am-gate-btn { width: 100%; }
.am-gate-box > .am-gate-btn { margin-top: 22px; }
.am-gate-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted-foreground);
}
.am-gate-or::before, .am-gate-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.am-gate-t { margin: 0 0 4px; font-size: 15px; line-height: 1.35; font-weight: 600; color: var(--foreground); }
.am-gate-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.am-gate-form .am-inp { min-width: 0; height: 44px; }
@media (min-width: 480px) {
    .am-gate-form { flex-direction: row; }
    .am-gate-form .am-inp { flex: 1; }
    .am-gate-form .am-gate-btn { width: auto; }
}
@media (max-width: 640px) {
    .am-gate { padding: 32px 0 48px; }
    .am-gate-box { padding: 26px 20px; }
}

/* ── menu akcji w nagłówku ── */
.am-menu { position: relative; }
.am-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: .5rem;
  color: var(--muted-foreground);
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer;
  list-style: none;
  transition: color .15s, background-color .15s;
}
.am-menu > summary::-webkit-details-marker { display: none; }
.am-menu > summary:hover { color: var(--foreground); background: color-mix(in oklab, var(--secondary) 60%, transparent); }
.am-menu-p {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: 232px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--elev-2);
}
.am-menu-i {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  color: var(--foreground);
  cursor: pointer;
}
.am-menu-i:hover { background: color-mix(in oklab, var(--secondary) 60%, transparent); }

/* ── modale: udostępnij / zgłoś błąd ── */
.am-dlg {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: auto;            /* preflight zeruje margin, a to on centruje <dialog> */
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--elev-2);
}
.am-dlg::backdrop { background: rgb(0 0 0 / .5); }
.am-dlg-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.am-dlg-t { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.am-dlg-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted-foreground);
  cursor: pointer;
}
.am-dlg-x:hover { color: var(--foreground); background: color-mix(in oklab, var(--secondary) 60%, transparent); }
.am-dlg-b { display: grid; gap: 6px; padding: 18px; }
.am-dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); }
.am-dlg-note { margin: 0 0 8px; font-size: 13.5px; line-height: 1.6; color: var(--muted-foreground); }
.am-dlg-hint { margin: 0 0 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted-foreground); }
.am-dlg-msg { display: block; font-size: 13.5px; font-weight: 600; opacity: 0; transition: opacity .5s ease-in; }
.am-dlg .text-success { color: var(--ok); }
.am-dlg .text-danger { color: var(--bad); }
.am-ta { min-height: 96px; font-family: inherit; resize: vertical; }
.am-cpy { display: flex; align-items: center; gap: 8px; }
.am-cpy .am-inp { flex: 1 1 auto; min-width: 0; }

/* ── ocena raportu ── */
.am-rate-scale { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 768px) { .am-rate-scale { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.am-rate-opt { position: relative; }
.am-rate-opt input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  overflow: hidden;
}
.am-rate-opt label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 12px 8px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--border);
  text-align: center;
  cursor: pointer;
  transition: color .15s, background-color .15s, box-shadow .15s;
}
.am-rate-opt label:hover { background: color-mix(in oklab, var(--secondary) 60%, transparent); }
.am-rate-opt input:checked + label {
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  box-shadow: inset 0 0 0 2px var(--primary);
}
.am-rate-opt input:focus-visible + label {
  box-shadow: inset 0 0 0 2px var(--primary), 0 0 0 3px color-mix(in oklab, var(--primary) 22%, transparent);
}
.am-rate-stars { display: flex; gap: 1px; color: var(--star-empty); transition: color .15s; }
.am-rate-opt input:checked + label .am-rate-stars { color: var(--primary); }
.am-rate-txt { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--muted-foreground); }
.am-rate-opt input:checked + label .am-rate-txt { color: var(--foreground); }

.am-rate-cmt { display: grid; gap: 6px; margin-top: 16px; }
.am-rate-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.am-rate-msg { flex: 1 1 auto; opacity: 1; color: var(--bad); }
.am-rate-ok { display: grid; gap: 4px; text-align: center; }
.am-rate-ok-t { margin: 0; font-size: 14px; font-weight: 600; color: var(--ok); }

/* ── Trustpilot (AF-9006): directly under the rating widget, without the section divider ── */
#ocena-raportu + .am-tp-sec { padding-top: 0; border-top: 0; }
.am-tp-main { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; }
.am-tp-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  color: #fff;
  background: #00b67a;
}
.am-tp-star { width: 26px; height: 26px; }
.am-tp-t { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--foreground); }
.am-tp-p { margin: 6px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted-foreground); }
.am-tp-btn { grid-column: 1 / -1; justify-self: start; height: auto; min-height: 48px; padding: 10px 20px; font-size: 15px; color: #fff; background: #00b67a; box-shadow: none; text-align: center; }
.am-tp-btn:hover { color: #fff; background: #00a06b; }
.am-tp-note { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; line-height: 1.5; color: var(--muted-foreground); }
@media (min-width: 768px) {
  .am-tp-main { grid-template-columns: auto minmax(0, 1fr) auto; }
  .am-tp-btn { grid-column: auto; align-self: center; white-space: nowrap; }
}

/* ── harmonogram serwisowy (SA) ── */
.am-sa-f { display: grid; gap: 12px; margin-top: 16px; align-items: end; }
.am-sa-f > div { display: grid; gap: 6px; min-width: 0; }
@media (min-width: 768px) { .am-sa-f { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; } } /* AF-7682: + country */
.am-sa-f .am-inp { height: 38px; }
.am-sa-hint { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--warn); }
.am-sa-msg { flex: 1 1 auto; opacity: 1; margin-top: 8px; color: var(--bad); }

.am-sa-meta { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 16px 0 0; }
.am-sa-meta > div { display: flex; align-items: baseline; gap: 6px; }
.am-sa-meta dt, .am-sa-meta dd { margin: 0; }
.am-sa-meta dd { font-size: 14px; font-weight: 600; color: var(--foreground); }

.am-sa-grid { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 768px) { .am-sa-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.am-sa-pt { display: flex; flex-direction: column; overflow: hidden; }
.am-sa-pt.is-current { box-shadow: inset 0 0 0 2px var(--primary), var(--elev-2); }
.am-sa-pt-h { display: grid; gap: 2px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.am-sa-pt.is-current .am-sa-pt-h { background: color-mix(in oklab, var(--primary) 10%, transparent); }
.am-sa-pt-t { font-size: 13.5px; font-weight: 600; color: var(--foreground); }
.am-sa-pt-v { font-size: 13px; color: var(--muted-foreground); }
.am-sa-pt-sep { padding: 0 4px; }
.am-sa-empty { margin: 0; padding: 14px; font-size: 13.5px; color: var(--muted-foreground); }
.am-sa-items { margin: 0; padding: 0; list-style: none; }
.am-sa-items > li { padding: 10px 14px; }
.am-sa-items > li + li { border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent); }
.am-sa-part { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--foreground); }
.am-sa-op { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted-foreground); }

/* ── przełącznik tłumaczenia maszynowego ── */
.am-lexbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  margin: 16px 0 8px;
}
.am-lex-note { margin: 0; flex: 1 1 320px; min-width: 0; font-size: 13px; line-height: 1.5; color: var(--muted-foreground); }
.am-lex-note strong { color: var(--foreground); }
.am-lex-lbl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted-foreground);
  cursor: pointer;
}
.am-lex-cb { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; }
.am-lex-sw {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--secondary) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: background-color .15s;
}
.am-lex-sw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted-foreground);
  transition: transform .15s, background-color .15s;
}
.am-lex-cb:checked + .am-lex-sw { background: var(--primary); }
.am-lex-cb:checked + .am-lex-sw::after { transform: translateX(12px); background: var(--primary-foreground); }
.am-lex-lbl:has(.am-lex-cb:checked) { color: var(--foreground); }
.am-lex-cb:focus-visible + .am-lex-sw { box-shadow: inset 0 0 0 1px var(--border), 0 0 0 3px color-mix(in oklab, var(--primary) 22%, transparent); }

.am-lexw:has(.am-lex-cb:checked) .am-org { display: none; }
.am-lexw:has(.am-lex-cb:not(:checked)) .am-lex { display: none; }

.am-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  background: none;
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer;
  transition: color .15s, background-color .15s;
}
.am-btn:hover { background: color-mix(in oklab, var(--secondary) 60%, transparent); }
.am-btn.is-done { color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ok) 55%, transparent); }
.am-btn-pri { color: var(--primary-foreground); background: var(--primary); box-shadow: none; }
.am-btn-pri:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }

/* ── metadane raportu w stopce ── */
.am-foot-meta { display: grid; gap: 8px; justify-items: flex-start; }
.am-meta { display: grid; gap: 3px; margin: 0; }
.am-meta > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.am-meta dt { margin: 0; }
.am-meta dd { margin: 0; font-size: 13px; font-weight: 600; color: var(--foreground); }
.am-foot-lnk { font-size: 13px; font-weight: 600; color: var(--primary); }
.am-foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 14px 0 26px;
  border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
}
.am-foot-nav .am-foot-lnk { color: var(--muted-foreground); font-weight: 500; }
.am-foot-nav .am-foot-lnk:hover { color: var(--foreground); }
@media (min-width: 640px) { .am-foot-nav { justify-content: center; gap: 8px 28px; } }

.am-foot-lnk:hover { text-decoration: underline; }
@media (min-width: 640px) {
  .am-foot-meta { justify-items: flex-end; text-align: right; }
  .am-meta > div { justify-content: flex-end; }
}

/* ── „zgłoś błąd" w notce sekcji ── */
.am-claim-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}
.am-claim-cta:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .am-hdr-in button { min-width: 44px; min-height: 44px; }
  .am-menu > summary { width: 44px; height: 44px; }
}

@media print {
  .am-menu { display: none !important; }
  .am-claim-cta { display: none !important; }
  dialog { display: none !important; }
}

/* ── oś czasu: węższa miara, serie, pasmo roku z bilansem, wiersz przebiegu ── */

/* Oś trzyma pełną szerokość kontenera i lewą krawędź, tak jak pozostałe sekcje raportu —
   inaczej pasmo roku i chipy nagłówka kończyłyby się w innym miejscu niż u sąsiadów.
   Węższa miara nic tu nie daje: wiersz i tak zajmuje ~210 px i jest dosunięty do lewej. */
#vehicle-history .am-sec-h,
#vehicle-history .am-tabs,
#vehicle-history .am-tl-wrap {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* pasmo roku niesie bilans: ile zdarzeń i ile kilometrów przybyło */
.am-tl-ysum {
  position: relative;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-left: 14px;
  background: var(--background);
}
.am-tl-ycount, .am-tl-ykm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.am-tl-ykm.is-bad { color: var(--bad); }

/* licznik serii zastępuje N powtórzonych wierszy, więc ma wagę tytułu */
.am-tl-n {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--acc, var(--primary));
  background: color-mix(in oklab, var(--acc, var(--primary)) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--acc, var(--primary)) 28%, transparent);
}

/* rozwinięta seria: każdy zapis osobno, rozdzielony kreską */
.am-tl-run-i + .am-tl-run-i {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed color-mix(in oklab, var(--border) 85%, transparent);
}

/* odczyt i przyrost to jedna myśl — stoją obok siebie, w dwóch wyrównanych kolumnach,
   zamiast rozjeżdżać się na przeciwne krańce wiersza */
.am-odo-line { display: flex; align-items: baseline; gap: 16px; }
.am-odo-read {
  flex: 0 0 auto;
  min-width: 100px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
  white-space: nowrap;
}
.am-odo-delta {
  flex: 0 0 auto;
  min-width: 100px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.am-odo-delta.is-bad { color: var(--bad); font-weight: 600; }

/* cofnięcie licznika to najważniejsza rzecz w raporcie: cały wiersz idzie na ton ostrzegawczy
   (--acc przemalowuje też obwódkę węzła i kreskę akcentu) */
.am-tl-i.is-back { --acc: var(--bad); }
.am-tl-i.is-back .am-odo-read { color: var(--bad); }

@media (max-width: 900px) {
}
@media (max-width: 640px) {
  /* Rynna miesiąca zjadała 70 z 390 px na napis drukowany raz na grupę.
     Na wąskim ekranie miesiąc jest nagłówkiem grupy, a treść dostaje pełną szerokość. */
  .am-tl-mg { grid-template-columns: 40px minmax(0, 1fr); }
  .am-tl-m {
    grid-column: 1 / -1;
    align-self: auto;
    text-align: left;
    /* nad kolumną treści, nie nad szyną — inaczej kreska przechodzi przez napis */
    padding: 0 0 8px 50px;
    font-size: 12.5px;
    letter-spacing: .06em;
  }
  .am-tl-es { grid-column: 1 / -1; }
  .am-tl-y { grid-template-columns: auto minmax(0, 1fr); }
  /* rok, jak miesiąc, nad kolumną treści — szyna przechodzi przez pasmo */
  .am-tl-y .n { justify-self: start; margin-left: 42px; padding: 0 12px 0 8px; }
  .am-tl-track, .am-tl-fill { left: 20px; }
  .am-tl-c { padding-left: 10px; }
  .am-tl-ysum { gap: 10px; padding-left: 10px; }

  /* odczyt do lewej, przyrost do prawej krawędzi — czyta się jak wyciąg z konta */
  .am-odo-line { width: auto; flex: 1 1 auto; gap: 10px; }
  .am-odo-read { min-width: 0; }
  .am-odo-delta { min-width: 0; margin-left: auto; text-align: right; }
}

/* ── dociągnięcie osi do projektu ── */

/* Księga to tabela, nie zdanie: odczyt i przyrost dostają stałą miarę, więc delty stoją
   w jednej kolumnie zamiast zawisać w losowym miejscu wiersza. */
.am-odo-line { width: 210px; max-width: 100%; gap: 10px; }
.am-odo-read { flex: 0 1 auto; }
.am-odo-delta { margin-left: auto; }

/* Węzeł miał kolorową poświatę, przez którą wyglądał na spuchnięty i gasił obwódkę.
   Zostaje sam pierścień i biała otoczka maskująca szynę — 3 px, bo przy odczytach
   co 48 px otoczka 5 px zostawiała z szyny 2 px. */
.am-tl-node {
  width: 36px;
  height: 36px;
  box-shadow:
    inset 0 0 0 1.5px color-mix(in oklab, var(--acc, var(--primary)) 42%, transparent),
    0 0 0 3px var(--background);
}

/* ciaśniejszy rytm — przy 181 wierszach każde 6 px na wiersz to ponad ekran różnicy */
.am-tl-es { row-gap: 12px; }
.am-tl-mg + .am-tl-mg { margin-top: 12px; }
.am-tl-i.is-odo .am-tl-sum { padding-top: 2px; padding-bottom: 2px; }

/* ── zdarzenie w ramce, jak pozostałe kafle raportu ── */

/* Kolor ramki tylko tam, gdzie coś znaczy: incydent i cofnięty licznik mają wyskoczyć spośród
   ~180 neutralnych wierszy. Otwarta karta bierze kolor swojego rodzaju jako znak stanu. */
.am-tl-i[data-k="dmg"] .am-tl-card,
.am-tl-i.is-back .am-tl-card {
  border-color: color-mix(in oklab, var(--acc, var(--primary)) 45%, var(--border));
  background: color-mix(in oklab, var(--acc, var(--primary)) 4%, var(--card));
}
details.am-tl-card[open] { border-color: color-mix(in oklab, var(--acc, var(--primary)) 40%, var(--border)); }
/* break-word nie zmienia min-content, więc długie złożenie w tytule wypychało treść za ramkę */
.am-tl-card, .am-tl-ttl { overflow-wrap: anywhere; }
@media (min-width: 641px) {
  .am-tl-sum { padding: 9px 14px; }
  .am-tl-body { padding: 0 14px 12px; }
}
/* odczyt przebiegu nie wyższy od węzła (36 px), inaczej ~115 takich wierszy rośnie */
.am-tl-i.is-odo .am-tl-sum { padding-top: 5px; padding-bottom: 5px; }

/* ── szyna: przystanek roku, zapalone węzły ── */

/* Przy gęstych odczytach szyna między węzłami i tak jest krótka, więc postęp niosą węzły:
   report.js dokłada is-lit wszystkiemu, co czubek paska już minął. Tylko na ekranie —
   wydruk nie zna pozycji przewinięcia i nie rysuje szyny. */
.js .am-tl-node[data-reveal] {
  transition: opacity .45s cubic-bezier(.22, 1, .36, 1), transform .45s cubic-bezier(.22, 1, .36, 1),
    background-color .3s, box-shadow .3s;
}
@media screen {
  .am-tl-y::after {
    content: "";
    position: absolute;
    left: 134px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 999px;
    background: var(--background);
    box-shadow: inset 0 0 0 2px var(--am-rail-line);
    transition: background-color .3s, box-shadow .3s;
  }
  .am-tl-y.is-lit::after {
    background: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 18%, transparent);
  }
  .am-tl-i.is-lit .am-tl-node {
    background: color-mix(in oklab, var(--acc, var(--primary)) 10%, var(--card));
    box-shadow: inset 0 0 0 1.5px var(--acc, var(--primary)), 0 0 0 3px var(--background);
  }
}
@media screen and (max-width: 640px) {
  .am-tl-y::after { left: 20px; }
}
