/* Prvi minut: vodič (prvi-minut.html, u okviru sajta, layouts/page.html) i vežba
   za ugradnju (prvi-minut-vezba.html, body.embed, samostalna).

   Izgled prati ezop.app: Inter, tamnoplava (brandNavy) za tekst, plava
   (brandBlue) za akcije i izbor, crvena (brandRed) samo za vatru i opasnost.
   Sve je pod `.pm` / `.pm-*`, jer strana deli css/site.css i Tailwind sa
   zaglavljem i podnožjem (site.css već ima `.btn`, `.step`, `.reveal`). */
:root {
  --ink: #1f3864; /* brandNavy */
  --ink2: #475569; /* slate-600 */
  --ink3: #64748b; /* slate-500 */
  --line: #e2e8f0; /* slate-200 */
  --line2: #f1f5f9; /* slate-100 */
  --paper: #ffffff;
  --wall: #f8fafc; /* unutrašnjost zgrade na crtežu */
  --tint: #eff6ff; /* blue-50 */
  --tint2: #dbeafe; /* blue-100 */
  --blue: #2563eb; /* brandBlue */
  --blue-d: #1d4ed8;
  --red: #a63232; /* brandRed */
  --fire: #dc2626;
  --amber: #f59e0b;
  --yes: #15803d;
  --no: #b91c1c;
  --mid: #b45309;
  --stage: #0f1b33;
  --stage-ink: #e2e8f0;
  --stage-dim: #94a3b8;
  --powder: #2563eb;
  --co2: #1f2937;
  --water: #dc2626;
  --foam: #d6c38c;
  --wet: #d97706;
  --shadow: 0 20px 25px -5px rgba(226, 232, 240, 0.6), 0 8px 10px -6px rgba(226, 232, 240, 0.6);
}

/* ------------------------------------------------------------ osnova */
.pm section[id],
.pm [data-anchor] {
  scroll-margin-top: 5.5rem;
}
.pm :focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}
.pm svg text {
  font-family: Inter, system-ui, sans-serif;
}

/* Dugmad: isti oblik kao u zaglavlju (rounded-xl, plava ili bela sa ivicom). */
.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.pm-btn:hover {
  border-color: var(--ink);
  background: #fff;
}
.pm-btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.pm-btn.primary:hover {
  border-color: var(--blue-d);
  background: var(--blue-d);
}
.pm-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.pm-btn svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

/* Kartice kao na info strani. */
.pm-card {
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.pm-note {
  border-left: 4px solid var(--red);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.85);
  padding: 1rem 1.25rem;
  color: #334155;
  font-size: 0.95rem;
}
.pm-note b {
  color: var(--ink);
}
.pm-small {
  font-size: 0.875rem;
  color: var(--ink3);
}

/* Zaglavlje odeljka: ikonica, redni broj, naslov, uvod. */
.pm-head {
  max-width: 46rem;
  margin-bottom: 2rem;
}
.pm-head-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.pm-ico {
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: var(--blue);
  color: #fff;
}
.pm-ico svg {
  height: 1.25rem;
  width: 1.25rem;
}
.pm-ico.red {
  background: var(--red);
}
.pm-num {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}
.pm-head h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.pm-lead {
  margin-top: 0.75rem;
  font-size: 1.075rem;
  line-height: 1.65;
  color: var(--ink2);
}

/* ------------------------------------------------------------ navigacija kroz vodič */
.pm-nav {
  position: sticky;
  top: 0.75rem;
  z-index: 25;
  margin: 0 auto;
  max-width: 72rem;
}
.pm-nav-in {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.375rem;
  box-shadow: 0 10px 30px -12px rgba(31, 56, 100, 0.25);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.pm-nav ul {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 0.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  /* Na uskom ekranu lista klizi; ivice se utapaju da se vidi da ima još. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 0.75rem, #000 calc(100% - 1.5rem), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 0.75rem, #000 calc(100% - 1.5rem), transparent);
  padding: 0 1.25rem 0 0.5rem;
}
.pm-nav ul::-webkit-scrollbar {
  display: none;
}
.pm-nav ul a {
  display: block;
  white-space: nowrap;
  border-radius: 0.625rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink2);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.pm-nav ul a:hover {
  background: var(--tint);
  color: var(--blue-d);
}
.pm-nav ul a[aria-current='true'] {
  background: var(--blue);
  color: #fff;
}
.pm-sos {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  border-radius: 0.75rem;
  background: var(--red);
  padding: 0.45rem 0.8rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.pm-sos:hover {
  background: #8c2828;
}
.pm-sos svg {
  width: 0.95rem;
  height: 0.95rem;
}

/* ------------------------------------------------------------ hero */
.pm-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.pm-hero h1 em {
  font-style: normal;
  color: var(--red);
}
.pm-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: var(--tint);
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-d);
}
.pm-pill svg {
  width: 0.9rem;
  height: 0.9rem;
}

/* Tamna scena za canvas (uvodna animacija i vežba). */
.stage {
  position: relative;
  overflow: hidden;
  border-radius: 1.75rem;
  background: radial-gradient(120% 90% at 70% 30%, #1b2b4d 0%, var(--stage) 65%);
  color: var(--stage-ink);
  box-shadow: 0 30px 60px -25px rgba(15, 27, 51, 0.55);
}
.stage canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.pm-hero .stage {
  width: 100%;
  aspect-ratio: 5/4;
}
.stage-cap {
  position: absolute;
  right: 1.25rem;
  bottom: 1.1rem;
  left: 1.25rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--stage-ink);
  opacity: 0;
  transition: opacity 0.6s;
}
.stage-cap.on {
  opacity: 1;
}
.replay {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.625rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--stage-ink);
  cursor: pointer;
}
.replay:hover {
  background: rgba(255, 255, 255, 0.18);
}
.stage-tag {
  position: absolute;
  top: 1.1rem;
  left: 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  color: var(--stage-dim);
}

/* ------------------------------------------------------------ trougao */
.tri {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.tri-fig {
  padding: 1.5rem;
}
.tri-fig > svg {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.side {
  cursor: pointer;
  outline: none;
}
.side line {
  stroke: var(--ink);
  stroke-width: 14;
  stroke-linecap: round;
  transition: stroke 0.3s, opacity 0.3s;
}
.side .hit {
  stroke: transparent;
  stroke-width: 44;
}
.side:hover line.vis,
.side:focus-visible line.vis {
  stroke: var(--blue);
}
.side.off line.vis {
  stroke: var(--ink3);
  stroke-dasharray: 2 18;
  opacity: 0.5;
}
.side text {
  fill: var(--ink);
  font-weight: 700;
  font-size: 19px;
}
.side:hover text,
.side:focus-visible text {
  fill: var(--blue);
}
#flame {
  transform-origin: 230px 300px;
  transition: transform 0.7s cubic-bezier(0.5, 0, 0.3, 1), opacity 0.7s;
}
#flame.out {
  transform: scale(0);
  opacity: 0;
}
.flick {
  animation: flick 1.6s ease-in-out infinite alternate;
  transform-origin: 230px 300px;
}
@keyframes flick {
  0% { transform: scaleY(1) skewX(0); }
  40% { transform: scaleY(1.06) skewX(-2deg); }
  100% { transform: scaleY(0.95) skewX(2deg); }
}
.tri-out {
  min-height: 11rem;
  padding: 1.5rem 1.75rem;
}
.tri-out h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.tri-out p {
  margin: 0;
  color: var(--ink2);
}

/* ------------------------------------------------------------ klase i sredstva */
.cls-detail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  min-height: 9.5rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem;
}
.cls-badge {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.1rem;
  background: var(--ink);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
}
.cls-detail h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.cls-detail p {
  margin: 0.35rem 0 0;
  max-width: 62ch;
  color: var(--ink2);
}
.cls-detail .warn {
  color: var(--red);
  font-weight: 600;
}
.cls-detail .small {
  font-size: 0.875rem;
  color: var(--ink3);
}
.mx-scroll {
  overflow-x: auto;
  padding: 0;
}
table.mx {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.mx th,
.mx td {
  padding: 0;
  border-bottom: 1px solid var(--line2);
  text-align: center;
}
.mx tbody tr:last-child th,
.mx tbody tr:last-child td {
  border-bottom: 0;
}
.mx thead th {
  border-bottom: 1px solid var(--line);
  vertical-align: bottom;
}
.mx thead th:first-child {
  padding: 0.75rem 0.9rem 0.75rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink3);
}
.mx th button {
  width: 100%;
  border: 0;
  background: none;
  padding: 0.75rem 0.5rem;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
}
.mx thead th button span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink3);
}
.mx thead th button:hover {
  color: var(--blue);
}
.mx tbody th {
  text-align: left;
}
.mx tbody th,
.mx thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: inset -1px 0 0 var(--line2);
}
.mx tbody th button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem 0.7rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
}
.mx tbody th button:hover {
  color: var(--blue);
}
.chip {
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}
.mx td {
  height: 2.9rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.mx td.y { color: var(--yes); }
.mx td.n { color: rgba(185, 28, 28, 0.45); }
.mx td.m { color: var(--mid); }
.mx .col-on {
  background: var(--tint);
}
.mx thead th.col-on button {
  color: var(--blue-d);
}
.mx tr.row-on th,
.mx tr.row-on td {
  background: #fef3c7;
}
.mx tr.row-on td.col-on {
  background: #fde68a;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--ink2);
}
.legend b {
  font-size: 1rem;
}
.agent-out {
  margin-top: 1rem;
  max-width: 72ch;
  min-height: 3.2em;
  color: var(--ink2);
}
.agent-out b {
  color: var(--ink);
}

/* ------------------------------------------------------------ aparat */
.anat {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.anat-fig {
  position: sticky;
  top: 6rem;
  padding: 1.25rem;
}
.anat-fig svg {
  display: block;
  width: 100%;
  height: auto;
}
.anat-fig .lbl {
  font-size: 14px;
  font-weight: 600;
  fill: var(--ink);
  transition: fill 0.3s;
}
.anat-fig .ldr {
  stroke: #94a3b8;
  stroke-width: 1.2;
}
.part {
  transition: filter 0.3s;
}
.part.hl {
  filter: drop-shadow(0 0 5px rgba(37, 99, 235, 0.9)) drop-shadow(0 0 2px rgba(37, 99, 235, 0.9));
}
.lblg.hl .lbl {
  fill: var(--blue);
}
.lblg.hl .ldr {
  stroke: var(--blue);
}
.check {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}
.check li + li {
  margin-top: 0.5rem;
}
.check label {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.check label:hover {
  border-color: rgba(37, 99, 235, 0.45);
}
.check label:has(input:checked) {
  border-color: #bfdbfe;
  background: var(--tint);
}
.check input {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0.1rem 0 0;
  border: 2px solid #cbd5e1;
  border-radius: 0.4rem;
  background: #fff;
  cursor: pointer;
}
.check input:checked {
  border-color: var(--blue);
  background: var(--blue);
}
.check input:checked::after {
  content: '';
  width: 0.35rem;
  height: 0.7rem;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.check b {
  display: block;
  font-weight: 600;
}
.check span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9rem;
  color: var(--ink2);
}
.verdict {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--wall);
  padding: 0.9rem 1.1rem;
  font-weight: 600;
}
.verdict.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.place {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 1.75rem;
  background: var(--tint2);
}
.place h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.place h3 svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--blue);
}
.place p {
  margin: 0;
  color: #334155;
}

/* ------------------------------------------------------------ veličine */
.sizes {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.models {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.models button {
  min-width: 4rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.5rem 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.models button:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.models button[aria-pressed='true'] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.scale-fig {
  padding: 0.75rem 0.75rem 0;
  overflow: hidden;
}
.scale-fig svg {
  display: block;
  width: 100%;
  height: auto;
}
#extG {
  transition: transform 0.55s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.big-model {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.spec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 0;
}
.spec div {
  border-radius: 1rem;
  background: var(--tint);
  padding: 0.9rem 1rem;
}
.spec dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink3);
}
.spec dd {
  margin: 0.25rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--blue);
}
.spec-use {
  min-height: 3.2em;
  margin: 1rem 0 0.5rem;
  color: #334155;
}

/* ------------------------------------------------------------ vežba */
.train {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
}
.train .stage {
  width: 100%;
  aspect-ratio: 16/11;
  touch-action: none;
  cursor: crosshair;
}
.train .stage canvas {
  touch-action: none;
}
.steps {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.steps li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line2);
  opacity: 0.55;
  transition: opacity 0.3s;
  counter-increment: s;
}
.steps {
  counter-reset: s;
}
.steps li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
.steps li.active {
  opacity: 1;
}
.steps li.active::before {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}
.steps li.done {
  opacity: 0.9;
}
.steps li.done::before {
  content: '✓';
  border-color: var(--yes);
  background: var(--yes);
  color: #fff;
}
.steps b {
  display: block;
  font-weight: 700;
}
.steps span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.9rem;
  color: var(--ink2);
}
.steps li .pm-btn {
  margin-top: 0.6rem;
}
.steps br {
  display: none;
}
.meters {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  border-radius: 1rem;
  background: var(--tint);
  padding: 0.9rem 1rem;
}
.meter {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) 2.75rem;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.875rem;
}
.meter .v {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.bar {
  height: 0.6rem;
  overflow: hidden;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  transition: width 0.12s linear;
}
#barFire i {
  background: linear-gradient(90deg, var(--amber), var(--fire));
}
#barAgent i {
  background: var(--blue);
}
.tmsg {
  min-height: 3.2em;
  margin: 0 0 0.75rem;
  font-weight: 600;
}
.kbd {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--ink3);
}
.embed-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.embed-link:hover {
  color: var(--blue);
}

/* ------------------------------------------------------------ kada ne gasiti */
.dont {
  border-radius: 1.75rem;
  background: var(--ink);
  color: #fff;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 30px 60px -30px rgba(31, 56, 100, 0.7);
}
.dont .pm-head h2 {
  color: #fff;
}
.dont .pm-lead {
  color: #cbd5e1;
}
.dont .pm-num {
  color: #fca5a5;
}
.rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.rules > div {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.1rem 1.25rem;
}
.rules h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
  color: #fff;
}
.rules h3::before {
  content: '';
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.2);
}
.rules p {
  margin: 0;
  font-size: 0.925rem;
  color: #cbd5e1;
}
.call {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.5rem;
  border-radius: 1.25rem;
  background: var(--red);
  padding: 1.1rem 1.5rem;
}
.call a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
  text-decoration: none;
}
.call a svg {
  width: 0.6em;
  height: 0.6em;
}
.call p {
  max-width: 52ch;
  margin: 0;
  color: #fee2e2;
}

/* ------------------------------------------------------------ zgrada */
.bld {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
}
.bld-fig {
  position: relative;
  overflow: hidden;
  padding: 0;
}
.bld-fig svg {
  display: block;
  width: 100%;
  height: auto;
}
.hs {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  padding: 0;
  border: 3px solid var(--fire);
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1);
  box-shadow: 0 0 0 2px #fff;
  cursor: pointer;
  transition: transform 0.2s;
}
.hs::after {
  content: '';
  position: absolute;
  inset: -9px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.3s;
}
.hs:hover,
.hs:focus-visible {
  transform: scale(1.15);
}
.hs[aria-pressed='true'] {
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.25);
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(37, 99, 235, 0.25);
}
.hs[aria-pressed='true']::after {
  opacity: 1;
  transform: scale(1);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}
.chips button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chips button:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.chips button[aria-pressed='true'] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.panel {
  position: sticky;
  top: 6rem;
  padding: 1.5rem 1.6rem;
}
.panel .kind {
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}
.panel h3 {
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.panel dl {
  margin: 0;
}
.panel dt {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
}
.panel dd {
  margin: 0.2rem 0 0;
  font-size: 0.925rem;
  color: var(--ink2);
}
.panel.swap {
  animation: swap 0.35s ease-out;
}
@keyframes swap {
  from { opacity: 0.2; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ održavanje */
.tl {
  position: relative;
  display: grid;
  /* Jedna kolona po roku (5 u RS, 6 u SI): koliko god ih ima, staju u jedan red. */
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tl::before {
  content: '';
  position: absolute;
  top: 1.75rem;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--line);
}
.tl li {
  position: relative;
}
.tl .dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0.9rem;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}
.tl li.law .dot {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}
.tl h3 {
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.tl p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink2);
}
.tl .who {
  display: inline-block;
  margin-top: 0.6rem;
  border-radius: 999px;
  background: var(--tint);
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue-d);
}
.tl li.law .who {
  background: #fef2f2;
  color: var(--red);
}

/* ------------------------------------------------------------ proizvođači */
.makers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.makers > div {
  padding: 1.25rem 1.35rem;
  border-radius: 1.25rem;
}
.makers h3 {
  margin-bottom: 0.6rem;
  font-weight: 700;
  line-height: 1.3;
}
.makers ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.makers li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--line2);
}
.makers li b {
  display: block;
  font-weight: 600;
}
.makers li span {
  display: block;
  font-size: 0.85rem;
  color: var(--ink3);
}

/* ------------------------------------------------------------ test */
.quiz {
  display: grid;
  gap: 1rem;
  max-width: 48rem;
}
.q {
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: #fff;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.q h3 {
  margin-bottom: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
}
.opts {
  display: grid;
  gap: 0.45rem;
}
.opts button {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--wall);
  padding: 0.65rem 0.9rem;
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.opts button:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--tint);
}
.opts button.right {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
  font-weight: 600;
}
.opts button.wrong {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}
.opts button:disabled {
  cursor: default;
}
.opts button:disabled:not(.right):not(.wrong) {
  color: var(--ink3);
}
.expl {
  display: none;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--ink2);
}
.q.answered .expl {
  display: block;
}
.score:empty {
  display: none;
}
.score {
  max-width: 48rem;
  margin-top: 1rem;
  border-radius: 1.25rem;
  background: var(--tint2);
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
}

/* ------------------------------------------------------------ raspored po širini */
@media (max-width: 1023px) {
  .tri,
  .anat,
  .sizes,
  .train,
  .bld {
    grid-template-columns: minmax(0, 1fr);
  }
  .anat-fig,
  .panel {
    position: static;
  }
  .anat-fig svg {
    max-width: 440px;
    margin: 0 auto;
  }
  .tri-out {
    min-height: 0;
  }
  .pm-hero .stage {
    aspect-ratio: 16/10;
  }
  .rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tl {
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }
  .tl::before {
    top: 0;
    bottom: 0;
    left: 1.75rem;
    width: 2px;
    height: auto;
  }
  .tl li {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 1rem;
  }
  .tl .dot {
    margin: 0;
  }
  .makers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 639px) {
  .pm-sos span {
    display: none;
  }
  .rules,
  .makers {
    grid-template-columns: minmax(0, 1fr);
  }
  .cls-detail {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.25rem;
  }
  .cls-badge {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.7rem;
  }
  .hs {
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border-width: 2px;
  }
  .hs::after {
    inset: -6px;
  }
  .meter {
    grid-template-columns: 6rem minmax(0, 1fr) 2.5rem;
  }
  .pm-hero .stage {
    aspect-ratio: 4/3.4;
  }
  .train .stage {
    aspect-ratio: 4/3.6;
  }
  .mx tbody th button {
    max-width: 9.5rem;
  }
  /* Crteži se smanjuju sa širinom, pa natpisi u njima rastu da ostanu čitljivi. */
  .anat-fig {
    padding: 0.5rem;
  }
  .anat-fig .lbl {
    font-size: 18px;
  }
  .scale-fig text {
    font-size: 24px;
  }
  .stage-cap {
    font-size: 0.85rem;
  }
  .tri-fig {
    padding: 1rem;
  }
  .tri-fig > svg {
    max-width: 320px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .flick {
    animation: none;
  }
  .pm *,
  .pm *::before,
  .pm *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------ prvi-minut-vezba.html
   Samo vežba, za iframe na tuđem sajtu. Visinu iframe-a bira domaćin, pa je
   raspored zbijen: opis i dugme ima samo aktivan korak, a ispod 640 px
   (širina iframe-a, ne ekrana) koraci idu ispod polja za vežbu. */
body.embed {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.embed *,
body.embed *::before,
body.embed *::after {
  box-sizing: border-box;
}
body.embed button {
  font-family: inherit;
  font-size: inherit;
}
.embed h1,
.embed h3,
.embed p {
  margin: 0;
}
.vz {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px clamp(12px, 3vw, 24px) 14px;
}
.vz-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 6px;
}
.vz h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.vz-origin {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
}
.vz-origin:hover {
  text-decoration: underline;
}
.vz-lead {
  max-width: 72ch;
  margin: 0 0 14px !important;
  font-size: 15px;
  color: var(--ink2);
}
.vz-note {
  max-width: 80ch;
  margin: 12px 0 0 !important;
  font-size: 13px;
  color: var(--ink3);
}
.embed .stage {
  border-radius: 1.25rem;
  box-shadow: none;
}
.embed .steps {
  margin-bottom: 12px;
}
.embed .steps li {
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 12px;
  padding: 6px 0;
  align-items: center;
}
.embed .steps li.active {
  align-items: start;
}
.embed .steps li::before {
  width: 2rem;
  height: 2rem;
  font-size: 0.85rem;
}
.embed .steps li:not(.active) span,
.embed .steps li:not(.active) br,
.embed .steps li:not(.active) button {
  display: none;
}
.embed .steps li .pm-btn {
  padding: 0.45rem 0.9rem;
}
.embed .meters {
  gap: 6px;
  margin-bottom: 10px;
  padding: 0.7rem 0.85rem;
}
.embed .tmsg {
  min-height: 2.4em;
  margin-bottom: 10px;
  font-size: 15px;
}
.embed #trainReset {
  padding: 0.45rem 0.9rem;
}
.embed .kbd {
  margin: 8px 0 0;
}
@media (max-width: 900px) {
  .embed .train {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
  }
  .embed .steps li b {
    font-size: 15px;
  }
  .embed .meter {
    grid-template-columns: minmax(0, 96px) minmax(0, 1fr) 40px;
    font-size: 13px;
  }
}
@media (max-width: 640px) {
  .embed .train {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .embed .train .stage {
    aspect-ratio: 16/10;
  }
  .embed .steps li {
    padding: 4px 0;
  }
  .embed .kbd {
    display: none;
  }
}
@media (max-width: 560px) {
  .vz {
    padding-top: 12px;
  }
  .vz-lead {
    display: none;
  }
}
