/* ATLAS - zajednički stil (prototip) */

:root {
  --on-c: #fff;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --border: #dde3e9;
  --text: #17212b;
  --text-2: #4b5b6b;
  --text-3: #6b7a89;
  --header-bg: #13253a;
  --header-text: #e8eef4;
  --accent: #1f6390;
  --accent-soft: #e3eef6;
  --focus: #2f7fb5;

  /* statusi */
  --st-closed: #b23a48;      --st-closed-bg: #fbecee;
  --st-works: #a8670f;       --st-works-bg: #fdf3e2;
  --st-limit: #4f5bab;       --st-limit-bg: #eceefa;
  --st-notice: #1f6390;      --st-notice-bg: #e3eef6;
  --st-ok: #2b7a4b;          --st-ok-bg: #e5f3ea;

  /* oznake cesta */
  --road-a: #2e7d4f;
  --road-d: #2a5ea8;
  --road-z: #e1b53e;
  --road-z-text: #2a2208;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(19 37 58 / .05), 0 4px 14px rgb(19 37 58 / .06);
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --on-c: #0b131b;
    --bg: #0f1720; --surface: #16212c; --surface-2: #1c2935; --border: #283746;
    --text: #e6edf3; --text-2: #b3c1ce; --text-3: #8698a8;
    --header-bg: #0b131b; --header-text: #e6edf3;
    --accent: #6fb0dc; --accent-soft: #19324a; --focus: #8cc4ea;
    --st-closed: #f08a95; --st-closed-bg: #3a1e24;
    --st-works: #f0b45c;  --st-works-bg: #3a2c16;
    --st-limit: #a6aef0;  --st-limit-bg: #262a48;
    --st-notice: #6fb0dc; --st-notice-bg: #19324a;
    --st-ok: #78c897;     --st-ok-bg: #18342a;
    --road-a: #2f7a4e; --road-d: #2d5e9f;
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --on-c: #0b131b;
  --bg: #0f1720; --surface: #16212c; --surface-2: #1c2935; --border: #283746;
  --text: #e6edf3; --text-2: #b3c1ce; --text-3: #8698a8;
  --header-bg: #0b131b; --header-text: #e6edf3;
  --accent: #6fb0dc; --accent-soft: #19324a; --focus: #8cc4ea;
  --st-closed: #f08a95; --st-closed-bg: #3a1e24;
  --st-works: #f0b45c;  --st-works-bg: #3a2c16;
  --st-limit: #a6aef0;  --st-limit-bg: #262a48;
  --st-notice: #6fb0dc; --st-notice-bg: #19324a;
  --st-ok: #78c897;     --st-ok-bg: #18342a;
  --road-a: #2f7a4e; --road-d: #2d5e9f;
  --shadow: 0 1px 2px rgb(0 0 0 / .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.ph { font-size: 1.15em; line-height: 1; }

/* ---------- Zaglavlje ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  color: var(--header-text);
}
.header-inner {
  max-width: 1240px; margin: 0 auto;
  height: 64px; padding: 0 20px;
  display: flex; align-items: center; gap: 28px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none;
  font-weight: 800; font-size: 21px; letter-spacing: .04em;
}
.brand > span { display: flex; align-items: baseline; gap: 8px; }
.brand small { font-weight: 500; font-size: 12px; letter-spacing: 0; opacity: .6; }
.logo { width: 30px; height: 30px; flex: none; }
.logo .logo-a { stroke: currentColor; }
.logo .logo-wave { stroke: #6fb0dc; }
.main-nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  color: inherit; opacity: .78; text-decoration: none; white-space: nowrap;
  padding: 7px 12px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 500;
  transition: background-color .15s, opacity .15s;
}
.main-nav a:hover { opacity: 1; background: rgb(255 255 255 / .07); }
.main-nav a[aria-current="page"] { opacity: 1; background: rgb(255 255 255 / .12); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid rgb(255 255 255 / .16); background: transparent; color: inherit;
  cursor: pointer; font-size: 18px;
}
.icon-btn:hover { background: rgb(255 255 255 / .08); }

.fresh {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; padding: 5px 11px; border-radius: 999px;
  background: rgb(255 255 255 / .08); white-space: nowrap;
}
.fresh i { width: 7px; height: 7px; border-radius: 50%; background: #5cc98a; }
.fresh.stale i { background: #e9a948; }
.fresh.old i { background: #e46f7c; }
/* Ista oznaka na svijetloj podlozi stranice (npr. Trenutno vrijeme) */
.fresh.on-page { background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; }

/* ---------- Raspored ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 28px 20px 56px; }
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.page-head h1 { margin: 0; font-size: 34px; line-height: 1.1; letter-spacing: -.02em; font-weight: 800; }
/* Dijelovi isključenih modula ne smiju bljesnuti dok se ne zna koji su uključeni (site.js doda mods-ready) */
html:not(.mods-ready) [data-module] { visibility: hidden; }
.page-head p { margin: 6px 0 0; color: var(--text-2); max-width: 62ch; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- Gumbi ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background-color .15s, transform .1s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #0b131b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0b131b; } }
.btn.primary:hover { filter: brightness(1.08); }

/* ---------- Sažetak ---------- */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.summary[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
.stat {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  font: inherit; color: var(--text); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.stat:hover { border-color: var(--text-3); }
.stat[aria-pressed="true"] { border-color: currentColor; box-shadow: 0 0 0 1px currentColor inset; }
.stat .ico {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 10px; font-size: 21px;
}
.stat b { display: block; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13.5px; color: var(--text-2); line-height: 1.3; display: block; }
.stat.closed { color: var(--st-closed); } .stat.closed .ico { background: var(--st-closed-bg); }
.stat.works  { color: var(--st-works); }  .stat.works .ico  { background: var(--st-works-bg); }
.stat.limit  { color: var(--st-limit); }  .stat.limit .ico  { background: var(--st-limit-bg); }
.stat.notice { color: var(--st-notice); } .stat.notice .ico { background: var(--st-notice-bg); }
.stat b, .stat span { color: var(--text); }
.stat span { color: var(--text-2); }

/* ---------- Izvješće ---------- */
.report-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--radius-sm); border: 0; background: transparent;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.tab .count {
  font-size: 12px; font-weight: 700; min-width: 22px; padding: 1px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); text-align: center;
}
.tab[aria-selected="true"] .count { background: var(--surface); color: var(--accent); }

.filters {
  display: grid; grid-template-columns: 1fr 220px; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.field { display: grid; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, .select {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
}
.input::placeholder { color: var(--text-3); }
.input-wrap { position: relative; }
.input-wrap .ph { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.input-wrap .input { padding-left: 36px; }

.report-body { padding: 8px 20px 20px; }
.lead {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 12px 0 4px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--text);
}
.lead > .ph { color: var(--accent); font-size: 22px; margin-top: 1px; }
.lead p { margin: 0; font-weight: 600; }
.lead p + p { margin-top: 8px; }

.group { margin-top: 22px; }
/* Naslov skupine kao kartica: okvir i svijetla podloga u boji skupine, puna ikona u kvadratu, broj desno */
.g-closed { --c: var(--st-closed); --c-bg: var(--st-closed-bg); }
.g-works  { --c: var(--st-works);  --c-bg: var(--st-works-bg); }
.g-limit  { --c: var(--st-limit);  --c-bg: var(--st-limit-bg); }
.g-notice { --c: var(--st-notice); --c-bg: var(--st-notice-bg); }
.group-title {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 10px; padding: 11px 16px 11px 12px;
  border: 1.5px solid var(--c, var(--accent)); border-radius: 10px; background: var(--c-bg, var(--accent-soft));
}
.group-title .tag {
  flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; font-size: 20px;
  background: var(--c, var(--accent)); color: var(--on-c); box-shadow: inset 0 -2px 0 rgb(0 0 0 / .12);
}
.group-title .tag .ph-fill { color: var(--on-c); }
.gt-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.gt-text b { font-size: 16.5px; font-weight: 700; color: var(--text); line-height: 1.25; }
.gt-text em { font-style: normal; font-size: 13px; font-weight: 500; color: var(--text-2); }
.gt-count { margin-left: auto; font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }

/* Ikona u kvadratu za naslove okvira (puna boja) i za retke popisa (svijetla podloga) */
.sq {
  flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: var(--on-c); font-size: 17px; box-shadow: inset 0 -2px 0 rgb(0 0 0 / .12);
}
.sq.soft { background: var(--accent-soft); color: var(--accent); box-shadow: none; }

.events { display: grid; gap: 8px; }
.event {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 13px 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid transparent;
  border-left: 3px solid var(--edge, var(--border));
}
.g-closed .event { --edge: var(--st-closed); }
.g-works  .event { --edge: var(--st-works); }
.g-limit  .event { --edge: var(--st-limit); }
.g-notice .event { --edge: var(--st-notice); }
.event h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; }
.event p { margin: 3px 0 0; color: var(--text-2); font-size: 14.5px; }
/* Opis događaja (bogati tekst) */
.rich.ev-detail { margin-top: 3px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.rich.ev-detail p { margin: 0 0 4px; }
.rich.ev-detail ul, .rich.ev-detail ol { margin: 2px 0 6px; }
/* Događaj bez oznake ceste: ikona skupine u boji skupine */
.road.cat { background: var(--c, var(--accent)); color: var(--on-c); box-shadow: none; font-size: 17px; }
.event .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 7px; font-size: 13px; color: var(--text-3); }
.event .meta span { display: inline-flex; align-items: center; gap: 5px; }
.event .until {
  font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--text-2);
  padding: 3px 9px; border-radius: 999px; background: var(--surface-2); font-variant-numeric: tabular-nums;
}

.road {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; height: 26px; padding: 0 8px; border-radius: 5px;
  font-size: 13.5px; font-weight: 800; letter-spacing: .02em; color: #fff;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .55);
}
.road.a { background: var(--road-a); }
.road.d { background: var(--road-d); }
.road.z { background: var(--road-z); color: var(--road-z-text); }
.road.l { background: #fff; color: #1d2733; box-shadow: inset 0 0 0 1.5px rgb(29 39 51 / .45); }
.road.rail { background: var(--text-2); color: var(--surface); box-shadow: none; font-size: 18px; }
.road.sea  { background: var(--accent); color: var(--surface); box-shadow: none; font-size: 18px; }
.road.sea.vsl { position: relative; overflow: visible; }
.road.sea .vb { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  background: var(--surface); color: var(--accent); font-size: 10.5px; box-shadow: 0 0 0 1.5px var(--accent); }

.empty {
  text-align: center; padding: 40px 20px; color: var(--text-2);
}
.empty .ph { font-size: 34px; color: var(--text-3); display: block; margin: 0 auto 8px; }

.report-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3);
}

/* ---------- Bočni stupac ---------- */
.side { display: grid; gap: 16px; }
.side .panel { padding: 18px; }
.side h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.side h2 { gap: 10px; }
.side h2 a { margin-left: auto; font-size: 13.5px; font-weight: 600; text-decoration: none; }

.radio { display: flex; align-items: center; gap: 12px; }
.play {
  display: grid; place-items: center; width: 46px; height: 46px; flex: none;
  border-radius: 50%; border: 0; background: var(--accent); color: var(--surface); font-size: 20px; cursor: pointer;
}
.radio b { display: block; font-size: 15px; }
.radio span { font-size: 13px; color: var(--text-3); }

.forecast { width: 100%; border-collapse: collapse; font-size: 14px; }
.forecast th { font-size: 12.5px; font-weight: 600; color: var(--text-3); text-align: center; padding: 0 0 8px; }
.forecast th:first-child { text-align: left; }
.forecast td { padding: 6px 0; border-top: 1px solid var(--border); }
.forecast td:not(:first-child) { text-align: center; }
.lvl { display: inline-block; width: 26px; height: 8px; border-radius: 4px; vertical-align: middle; }
.lvl.l1 { background: var(--st-ok); opacity: .55; }
.lvl.l2 { background: var(--st-works); opacity: .75; }
.lvl.l3 { background: var(--st-closed); opacity: .7; }
.lvl.l4 { background: var(--st-closed); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .lvl { width: 14px; }

.meteo p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.meteo .temps { display: flex; gap: 18px; margin-bottom: 10px; }
.meteo .temps div { font-size: 13px; color: var(--text-3); }
.meteo .temps b { display: block; font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.meteo-next { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.meteo-next h3 { margin: 0 0 6px; font-size: 14.5px; font-weight: 700; }

.links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.links a {
  display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); text-decoration: none; font-size: 14.5px; font-weight: 600;
}
.links a:hover { background: var(--surface-2); }
.links a .ph { color: var(--accent); font-size: 19px; }

.site-footer {
  max-width: 1240px; margin: 0 auto; padding: 22px 20px 40px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  font-size: 13px; color: var(--text-3); border-top: 1px solid var(--border);
}
.site-footer a { color: inherit; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

.proto-note {
  font-size: 12.5px; color: var(--text-3); margin-top: 6px;
}

.mobile-nav { display: none; }

/* ---------- Mobitel ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .summary, .summary[data-n="3"] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .header-inner { justify-content: space-between; }
  .main-nav { display: none; }
  .mobile-nav { display: flex; }
}
@media (max-width: 720px) {
  .header-inner { gap: 14px; padding: 0 16px; }
  .header-tools .fresh span { display: none; }
  .page { padding: 20px 16px 40px; }
  .page-head h1 { font-size: 25px; }
  .filters { grid-template-columns: 1fr; padding: 14px 16px; }
  .tab { justify-content: center; padding: 9px 6px; gap: 6px; font-size: 14px; }
  .tab > .ph { display: none; }
  .report-body { padding: 4px 16px 16px; }
  .event { grid-template-columns: 1fr; gap: 8px; }
  .event .until { justify-self: start; }
  .summary { gap: 8px; }
  .stat { padding: 12px; gap: 10px; }
  .stat .ico { width: 34px; height: 34px; font-size: 18px; }
  .stat b { font-size: 20px; }
}
.mobile-nav {
  gap: 6px; overflow-x: auto; padding: 8px 16px 10px;
  background: var(--header-bg); scrollbar-width: none;
}
.mobile-nav a {
  flex: none; color: var(--header-text); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .08);
}
.mobile-nav a[aria-current="page"] { background: rgb(255 255 255 / .2); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Zajedničko za podstranice ---------- */
.level {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
}
.level.l1 { background: var(--st-ok-bg); color: var(--st-ok); }
.level.l2 { background: var(--st-works-bg); color: var(--st-works); }
.level.l3 { background: var(--st-closed-bg); color: var(--st-closed); }
.level.l4 { background: var(--st-closed); color: var(--surface); }

.days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.day { padding: 20px; }
.day-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.day-head h2 { margin: 0; font-size: 19px; }
.day-head small { display: block; color: var(--text-3); font-size: 13.5px; font-weight: 600; }
.cat-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.cat-row + .cat-row { border-top: 1px solid var(--border); }
.cat-row .sq { width: 36px; height: 36px; font-size: 20px; } /* kao ikone skupina na Stanju u prometu */
.cat-row span.name { flex: 1; font-size: 15px; }
.explain { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.explain div { padding: 14px 16px; }
.explain p { margin: 8px 0 0; font-size: 14px; color: var(--text-2); }

.seg-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-2); }
.seg-tabs button {
  padding: 8px 16px; border: 0; border-radius: 7px; background: transparent;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.seg-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

@media (max-width: 1000px) {
  .days { grid-template-columns: 1fr; }
  .explain { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .explain { grid-template-columns: 1fr; }
}

/* ---------- Pomoć: upitnik s oblačićem i prozor s informacijama ---------- */
.help { position: relative; display: inline-flex; vertical-align: middle; }
.help-btn {
  display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-3); font-size: 15px; cursor: pointer;
}
.help-btn:hover, .help-btn[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.help-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 25;
  width: min(340px, calc(100vw - 32px)); padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgb(19 37 58 / .16); font-size: 14px; line-height: 1.45; color: var(--text-2);
  text-align: left; font-weight: 400; letter-spacing: 0;
}
.help-pop[hidden] { display: none; }
.help-pop dl { margin: 0; display: grid; gap: 9px; }
.help-pop dt { margin-bottom: 2px; }
.help-pop dd { margin: 0; }

.btn.small { padding: 7px 12px; font-size: 14px; }
.btn.ghost { background: transparent; }

dialog.info {
  width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); color: var(--text);
  box-shadow: 0 18px 50px rgb(19 37 58 / .25);
}
dialog.info::backdrop { background: rgb(8 15 22 / .45); }
.info-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.info-head h2 { margin: 0; font-size: 18px; }
.info-head button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-3); font-size: 18px; cursor: pointer; }
.info-head button:hover { background: var(--surface-2); color: var(--text); }
.info-body { padding: 8px 18px 20px; font-size: 15px; color: var(--text-2); }
.info-body p { margin: 10px 0 0; }
.info-body ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.info-body b { color: var(--text); }
.info-body .levels-legend { margin: 10px 0 0; display: grid; gap: 10px; }
.levels-legend div { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: start; }
.levels-legend dt { margin: 0; padding-top: 4px; display: flex; }
/* Kvadratić boje: zeleno, narančasto, crveno (svjetlije) i potpuno crveno */
.swatch { flex: none; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--c); background: var(--c); }
.swatch.l1 { --c: var(--st-ok); }
.swatch.l2 { --c: var(--st-works); }
.swatch.l3 { --c: var(--st-closed); background: color-mix(in srgb, var(--st-closed) 40%, var(--surface)); }
.swatch.l4 { --c: var(--st-closed); }
.levels-legend dd { margin: 0; }

/* Boje temperature */
.tc1 { color: #5a47b5; } .tc2 { color: #2d69b8; } .tc3 { color: #127f86; }
.tc4 { color: #2b7a4b; } .tc5 { color: #b4600b; } .tc6 { color: #bf3434; }
:root[data-theme="dark"] .tc1 { color: #b0a4f7; } :root[data-theme="dark"] .tc2 { color: #7fb2f2; }
:root[data-theme="dark"] .tc3 { color: #63cdd2; } :root[data-theme="dark"] .tc4 { color: #7fd09d; }
:root[data-theme="dark"] .tc5 { color: #f2ad62; } :root[data-theme="dark"] .tc6 { color: #f58c84; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tc1 { color: #b0a4f7; } :root:not([data-theme="light"]) .tc2 { color: #7fb2f2; }
  :root:not([data-theme="light"]) .tc3 { color: #63cdd2; } :root:not([data-theme="light"]) .tc4 { color: #7fd09d; }
  :root:not([data-theme="light"]) .tc5 { color: #f2ad62; } :root:not([data-theme="light"]) .tc6 { color: #f58c84; }
}
@media (max-width: 560px) {
  .help { position: static; }
  .help-pop { left: 0; right: 0; width: auto; }
  .page-head > div:first-child { position: relative; }
}

/* ---------- Izvješće (bogati tekst) ---------- */
.report-box { margin: 14px 0 6px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); }
/* Uvodni tekst odvojen je crtom i razmakom od popisa događaja */
.report-box + .group, .report-box + .empty { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.report-box + .empty { padding-bottom: 24px; }
.rich { font-size: 15.5px; line-height: 1.6; color: var(--text); }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich p { margin: 0 0 8px; }
.rich h2, .rich h3 { font-size: 16.5px; margin: 14px 0 6px; }
.rich ul, .rich ol { margin: 4px 0 10px; padding-left: 22px; }
.rich li { margin: 3px 0; }
.rich blockquote { margin: 10px 0; padding: 6px 0 6px 14px; border-left: 3px solid var(--accent); color: var(--text-2); font-style: italic; }
.rich a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.rich .ql-color-red { color: var(--st-closed); }
.rich .ql-color-orange { color: var(--st-works); }
.rich .ql-color-green { color: var(--st-ok); }
.rich .ql-color-blue { color: var(--accent); }
.rich .ql-color-gray { color: var(--text-3); }
.rich .ql-color-purple { color: #7a5bc4; }
.rich .ql-bg-green { background: var(--st-ok-bg); border-radius: 3px; padding: 0 2px; }
.rich .ql-bg-red { background: var(--st-closed-bg); border-radius: 3px; padding: 0 2px; }
:root[data-theme="dark"] .rich .ql-color-purple { color: #b6a2f0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rich .ql-color-purple { color: #b6a2f0; } }
.rich ul ul, .rich ol ol, .rich ul ol, .rich ol ul { margin: 3px 0 3px; }
.rich ul ul { list-style: circle; }
.rich ul ul ul { list-style: square; }
.rich ol ol { list-style: lower-alpha; }
.rich .ql-align-center { text-align: center; }
.rich .ql-align-right { text-align: right; }
.rich .ql-align-justify { text-align: justify; }
.rich .ql-indent-1:not(li) { padding-left: 2em; } .rich .ql-indent-2:not(li) { padding-left: 4em; } .rich .ql-indent-3:not(li) { padding-left: 6em; }
.rich .ql-bg-yellow { background: #fff0a6; color: #1d1d1d; border-radius: 3px; padding: 0 2px; }
.rich .ql-bg-blue { background: var(--accent-soft); border-radius: 3px; padding: 0 2px; }
:root[data-theme="dark"] .rich .ql-bg-yellow { background: rgb(240 200 70 / .28); color: inherit; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rich .ql-bg-yellow { background: rgb(240 200 70 / .28); color: inherit; } }

.rep-level { margin: 8px 0 6px; font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.rep-roads { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rep-roads li { display: flex; align-items: center; gap: 8px; font-size: 15px; flex-wrap: wrap; }
.rep-roads .road { min-width: 46px; height: 24px; font-size: 12.5px; }
.rep-note { margin: 10px 0 0; font-size: 14px; color: var(--text-2); }

/* Vjetar i zimski uvjeti: ikone u boji kao kod skupina događaja */
:root { --st-wind: #2f7f86; --st-winter: #3b78b8; }
:root[data-theme="dark"] { --st-wind: #6cc5cc; --st-winter: #8bbcf0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --st-wind: #6cc5cc; --st-winter: #8bbcf0; } }
.g-wind   { --c: var(--st-wind);   --c-bg: color-mix(in srgb, var(--st-wind) 12%, var(--surface)); }
.g-winter { --c: var(--st-winter); --c-bg: color-mix(in srgb, var(--st-winter) 12%, var(--surface)); }
.rep-group + .rep-group { margin-top: 10px; }
/* Vjetar i zimski uvjeti kao skupine ispod izvješća: okvir kao kod događaja */
.group .rep-group { padding: 10px 14px 12px; border-radius: var(--radius-sm); background: var(--bg); border-left: 3px solid var(--c); }
.group .rep-group + .rep-group { margin-top: 8px; }
.group .rep-level { margin-top: 0; }
.group .rep-group.alert { margin: 0; padding: 10px 14px 12px; border: 1.5px solid var(--st-closed); border-left-width: 3px; }
.rep-group.alert { margin-left: -2px; margin-right: -2px; padding: 4px 12px 10px; border: 1.5px solid var(--st-closed); border-radius: var(--radius-sm); }
.rep-group.alert .rep-level { color: var(--st-closed); }

/* ---------- Obavijest o testnom radu ---------- */
dialog.test-notice {
  width: min(360px, calc(100vw - 32px)); padding: 26px 24px 22px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); color: var(--text); text-align: center;
  box-shadow: 0 18px 50px rgb(19 37 58 / .25);
}
dialog.test-notice::backdrop { background: rgb(8 15 22 / .45); }
.test-notice p { margin: 14px 0 18px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.test-notice .btn { width: 100%; justify-content: center; }
.mini-spin { width: 56px; height: 56px; margin: 0 auto; display: grid; place-items: center; border-radius: 14px;
  background: var(--header-bg); perspective: 300px; }
.mini-spin .logo { width: 36px; height: 36px; color: #fff; animation: logo-turn 4.8s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes logo-turn { 0%, 30% { transform: rotateY(0deg); } 70%, 100% { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .mini-spin .logo { animation: none; } }

/* ---------- Pravne stranice (uvjeti, privatnost) ---------- */
.legal { max-width: 820px; }
.prose { padding: 26px 30px 30px; font-size: 15.5px; line-height: 1.65; color: var(--text-2); }
.prose h2 { margin: 26px 0 8px; font-size: 18px; color: var(--text); }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.prose b { color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose .summary { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 8px;
  border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text); }
.prose .summary .ph { font-size: 22px; color: var(--accent); margin-top: 2px; }
.prose .summary p { margin: 0; }
.prose .legal-date { margin: 24px 0 0; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-3); }
mark.todo { background: var(--st-works-bg); color: var(--st-works); border-radius: 4px; padding: 0 4px; font-weight: 600; }
@media (max-width: 720px) { .prose { padding: 20px 18px 22px; } }

/* Svi moduli isključeni (stranica 404): ni poveznica na početnu nema smisla */
.all-off .main-nav a[href="index.html"], .all-off .mobile-nav a[href="index.html"] { display: none; }

/* ---------- Interaktivna karta (atlasmap.js) ---------- */
.amap { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background: var(--surface); cursor: grab; outline: none; }
.amap:active { cursor: grabbing; }
.amap:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.amap canvas { position: absolute; inset: 0; display: block; }
.amap-layer { position: absolute; inset: 0; pointer-events: none; }
.amap-mk {
  position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; padding: 0; display: grid; place-items: center;
  border-radius: 10px; border: 2px solid var(--surface); background: var(--c); color: var(--on-c); font-size: 18px;
  box-shadow: 0 2px 8px rgb(10 20 30 / .35); cursor: pointer; pointer-events: auto; transition: scale .12s;
}
.amap-mk:hover { scale: 1.12; }
.amap-mk:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.amap-mk[hidden] { display: none; }
.amap-mk.preview { animation: mk-pulse 1.6s ease-in-out infinite; }
@keyframes mk-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--c) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) { .amap-mk.preview { animation: none; } }
.amap-ctrl { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; }
.amap-ctrl button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; font-size: 18px; cursor: pointer;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.amap-ctrl button:hover { color: var(--accent); }
.amap-note { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); max-width: calc(100% - 120px);
  padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 13.5px; font-weight: 600; color: var(--text-2); text-align: center; pointer-events: none; }
.amap-note[hidden] { display: none; }
.amap-pop {
  position: absolute; left: 0; top: 0; z-index: 3; width: min(330px, calc(100% - 16px)); padding: 14px 16px 14px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 12px 34px rgb(10 20 30 / .25); font-size: 14.5px; color: var(--text-2); cursor: auto;
}
.amap-pop[hidden] { display: none; }
.amap-pop.docked { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; transform: none !important; }
.amap-x { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-3); font-size: 17px; cursor: pointer; }
.amap-x:hover { background: var(--surface-2); color: var(--text); }
.amap-pt { display: flex; align-items: center; gap: 10px; padding-right: 30px; font-weight: 800; font-size: 15.5px; color: var(--text); }
.amap-pt .sq { width: 30px; height: 30px; font-size: 17px; background: var(--c); }
.amap-pr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-weight: 600; color: var(--text); }
.amap-pr .road { min-width: 44px; height: 24px; font-size: 12.5px; }
.amap-pr .ph { color: var(--text-3); }
.amap-pd, .amap-pu { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13.5px; }
.amap-pop p { margin: 8px 0 0; line-height: 1.5; }

.amap-attr { position: absolute; right: 6px; bottom: 4px; padding: 1px 6px; border-radius: 4px; font-size: 11px; color: var(--text-3);
  background: color-mix(in srgb, var(--surface) 80%, transparent); pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Karta na OSM podlozi (MapLibre) */
.amap-gl .amap-canvas { position: absolute; inset: 0; z-index: 0; } /* ikone ostaju ispod oblačića i gumba */
.amap-gl canvas { position: static; }
.amap-mk.gl { left: 0; top: 0; }
/* Ikona događaja (icons.js): bijela pločica s rubom u boji linije */
.ik-tile { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 2px; border-radius: 8px;
  background: #fff; border: 2px solid var(--ic); box-sizing: border-box; }
.ik-tile svg { width: 100%; height: 100%; display: block; }
/* Na karti: manji okvir, crtež do ruba (uži viewBox); bez povećanja pod mišem da ikona ne bježi */
.amap-mk.ik { width: 32px; height: 32px; padding: 0; border-radius: 8px; background: #fff; border: 1.5px solid var(--ic); --c: var(--ic); transition: box-shadow .12s; }
.amap-mk.ik:hover { scale: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ic) 45%, transparent), 0 2px 8px rgb(10 20 30 / .35); z-index: 1000 !important; }
.amap-mk.ik svg { width: 100%; height: 100%; display: block; }
.amap-mk.ik.minor { width: 26px; height: 26px; border-radius: 7px; } /* ceste koje nisu autoceste */
.amap-pt .ik-tile { width: 34px; height: 34px; }
/* Moja lokacija */
.amap-ctrl button.on { color: var(--accent); border-color: var(--accent); }
.amap-ctrl button.follow { background: var(--accent); color: var(--on-c); }
.amap-me { width: 20px; height: 20px; border-radius: 50%; background: #2b78c5; border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .15), 0 2px 6px rgb(10 20 30 / .4); animation: me-pulse 2s ease-out infinite; }
.amap-me .hd { display: none; position: absolute; left: 50%; top: -14px; width: 0; height: 0; margin-left: -7px;
  border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 11px solid #2b78c5; transform-origin: 7px 24px; }
.amap-me.moving .hd { display: block; transform: rotate(var(--hd, 0deg)); }
@keyframes me-pulse { 0% { box-shadow: 0 0 0 0 rgb(43 120 197 / .45), 0 2px 6px rgb(10 20 30 / .4); } 70%, 100% { box-shadow: 0 0 0 14px rgb(43 120 197 / 0), 0 2px 6px rgb(10 20 30 / .4); } }
@media (prefers-reduced-motion: reduce) { .amap-me { animation: none; } }
/* Crtanje u adminu: točke dionice */
.amap-gl.drawing .maplibregl-canvas { cursor: crosshair; }
.amap-gl .maplibregl-ctrl-attrib { font-size: 11px; background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--text-3); }
.amap-gl .maplibregl-ctrl-attrib a { color: var(--text-2); }
.amap-gl .maplibregl-ctrl-attrib-button { filter: var(--attrib-filter, none); }
:root[data-theme="dark"] .amap-gl { --attrib-filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .amap-gl { --attrib-filter: invert(1); } }

/* Vlastiti player (snimka se pušta izravno, bez Vocaroo stranice) */
.ap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border); }
.ap-play { width: 60px; height: 60px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--accent); color: var(--on-c); font-size: 28px; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.ap-play:hover { filter: brightness(1.08); }
.ap-play:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.ap-main { display: grid; gap: 8px; min-width: 0; }
.ap-bar { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; cursor: pointer; margin: 0;
  background: linear-gradient(var(--accent), var(--accent)) 0 / var(--p, 0%) 100% no-repeat, var(--border); }
.ap-bar::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
.ap-bar::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); }
.ap-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ap-row .sp { flex: 1; }
.ap-skip { border: 0; background: none; color: var(--text-2); cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 6px; }
.ap-skip:hover { background: var(--surface-2); color: var(--text); }
.ap-err { grid-column: 1 / -1; color: var(--text-3); font-size: 14px; }
.ap.compact { grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.ap.compact .ap-play { width: 44px; height: 44px; font-size: 20px; }
.ap.compact .ap-main { gap: 4px; }
.ap.compact .ap-label { font-size: 13.5px; font-weight: 700; color: var(--text); display: flex; gap: 8px; align-items: baseline; }
.ap.compact .ap-label small { font-weight: 600; color: var(--text-3); }
.ap.compact .ap-skip { display: none; }

/* ---------- Stanje u prometu (studeni 2026.): izvješće preko cijele širine ---------- */
/* Mjesto za traku za pomicanje uvijek je rezervirano: širina se ne mijenja kad je izvješće kraće (npr. Pomorski) */
html { scrollbar-gutter: stable; }
.head-audio { width: min(400px, 100%); }
.report-panel .report-tabs { padding: 8px; gap: 6px; }
.report-panel .tab { padding: 13px 16px; font-size: 16.5px; font-weight: 700; gap: 10px; }
.report-panel .tab .ph { font-size: 21px; }
.report-panel .report-body { padding: 14px 28px 30px; }
.report-panel .report-box { padding: 18px 22px; font-size: 16px; }
@media (max-width: 760px) {
  .report-panel .tab { padding: 11px 8px; font-size: 14.5px; gap: 6px; }
  .report-panel .report-body { padding: 8px 14px 20px; }
}

/* ---------- Kalendar gustoće prometa (calendar.js) ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.cal-head h2 { margin: 0; font-size: 21px; font-weight: 800; }
.cal-head .icon-btn:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 4px; }
.cal-cell { position: relative; aspect-ratio: 1 / 1; min-height: 40px; display: grid; place-items: center; padding: 0; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font: inherit; transition: transform .1s, box-shadow .15s; }
.cal-cell.empty { border: 0; background: none; cursor: default; }
.cal-cell b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-cell:hover:not(.empty) { transform: translateY(-1px); box-shadow: var(--shadow); }
.cal-cell:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cal-cell.we b { color: var(--text-2); }
.cal-cell.past { opacity: .55; }
.cal-cell.l1 { background: var(--st-ok-bg); border-color: var(--st-ok); }
.cal-cell.l2 { background: var(--st-works-bg); border-color: var(--st-works); }
.cal-cell.l3 { background: color-mix(in srgb, var(--st-closed) 28%, var(--surface)); border-color: var(--st-closed); }
.cal-cell.l4 { background: var(--st-closed); border-color: var(--st-closed); }
.cal-cell.l4 b { color: var(--on-c); }
.cal-cell.today::after { content: ""; position: absolute; bottom: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal-cell.l4.today::after { background: var(--on-c); }
.cal-cell[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); border-color: var(--accent); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 13.5px; color: var(--text-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-sw { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--border); background: var(--bg); }
.cal-sw.l1 { background: var(--st-ok-bg); border-color: var(--st-ok); }
.cal-sw.l2 { background: var(--st-works-bg); border-color: var(--st-works); }
.cal-sw.l3 { background: color-mix(in srgb, var(--st-closed) 28%, var(--surface)); border-color: var(--st-closed); }
.cal-sw.l4 { background: var(--st-closed); border-color: var(--st-closed); }
@media (max-width: 560px) { .cal-grid { gap: 4px; } .cal-cell { border-radius: 8px; min-height: 0; } .cal-cell b { font-size: 14px; } }
/* Vjetar i zimski uvjeti kao događaji: svaka dionica zasebna kartica ispod teksta ograničenja (kao zatvorene ceste, radovi) */
.g-wind .event { --edge: var(--st-wind); }
.g-winter .event { --edge: var(--st-winter); }
.group .rep-group { padding: 0; background: none; border: 0; border-radius: 0; }
.group .rep-group + .rep-group { margin-top: 14px; }
.group .rep-group .rep-level { margin: 2px 2px 8px; font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.group .rep-group .event { grid-template-columns: 64px minmax(0, 1fr); }
.group .rep-group.alert { margin: 0; padding: 0; border: 0; animation: none; }
.group .rep-group.alert .rep-level { color: var(--st-closed); }
/* Zabrana za sva vozila: samo crveni okvir (bez treptanja, želja korisnika) */
.group .rep-group.alert .event { --edge: var(--st-closed); border: 1.5px solid var(--st-closed); border-left-width: 3px; }
