/* Grosuplje v številkah — drill-down teme → tema → kazalnik.
   Gradi na tokenih iz style.css; tu so le barve primerjalnih serij in
   komponente, ki jih druge strani nimajo. */

:root {
  /* Primerjalne serije (validirano z dataviz validatorjem, svetla podlaga):
     Grosuplje = modra strani, Slovenija = nevtralna črtkana, sosedje v
     fiksnem vrstnem redu. Barva sledi občini, ne vrstnemu redu prikaza. */
  --cmp-home: #409ac7;
  --cmp-si:   #616873;
  --cmp-1:    #eb6834;
  --cmp-2:    #1baf7a;
  --cmp-3:    #4a3aa7;
  --cmp-4:    #e87ba4;
  --cmp-dot:  #b9c4cf;   /* ostale občine na traku */
}
@media (prefers-color-scheme: dark) {
  :root {
    --cmp-home: #3f97cc;
    --cmp-si:   #8d9baa;
    --cmp-1:    #d95926;
    --cmp-2:    #199e70;
    --cmp-3:    #9085e9;
    --cmp-4:    #d55181;
    --cmp-dot:  #3a4b5c;
  }
}

/* ---------- Drobtinice ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
  margin: 0 0 1.1rem; font-size: 0.85rem; font-weight: 600; color: var(--ink-3);
  min-height: 1.6rem;
}
.crumbs a {
  color: var(--blue-deep); text-decoration: none;
  background: var(--tint); border-radius: 999px; padding: 0.22rem 0.7rem;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.crumbs a:hover { background: var(--tint-2); color: var(--blue); }
.crumbs .sep { color: var(--ink-3); }
.crumbs [aria-current="page"] { color: var(--ink); padding: 0.22rem 0.2rem; }

.ob-loading, .ob-error { color: var(--ink-3); font-weight: 600; }
.ob-error { color: var(--bad-ink); }

/* ---------- Nivo 1: teme ---------- */
.themes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(0.75rem, 2.5vw, 1.1rem);
}
.theme-card, .ind-tile {
  display: flex; flex-direction: column; gap: 0.35rem;
  text-align: left; font: inherit; color: inherit; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1rem 1.1rem 1.05rem; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
  animation: rise 460ms var(--ease) both;
}
.theme-card:hover, .ind-tile:hover,
.theme-card:focus-visible, .ind-tile:focus-visible {
  transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--blue-soft);
}
.theme-name {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--blue-deep);
}
.theme-lede { margin: 0; font-size: 0.85rem; color: var(--ink-2); }
.theme-head { display: flex; align-items: baseline; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.3rem; }
.theme-more { margin-top: auto; padding-top: 0.4rem; font-size: 0.78rem; font-weight: 700; color: var(--blue-deep); }
.theme-more::after { content: " →"; }

.big {
  font-variant-numeric: tabular-nums; font-size: 1.75rem; font-weight: 700;
  line-height: 1.05; letter-spacing: -0.02em; color: var(--ink);
}
.big-unit { font-size: 0.85rem; font-weight: 600; color: var(--ink-3); }
.small-label { font-size: 0.78rem; color: var(--ink-3); }

/* Sparkline (inline SVG) */
.spark { display: block; width: 100%; height: 34px; margin-top: 0.3rem; overflow: visible; }
.spark path { fill: none; stroke: var(--cmp-home); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--cmp-home); stroke: var(--card); stroke-width: 2; }

/* ---------- Nivo 2: tema ---------- */
.theme-intro { margin: -0.4rem 0 1rem; color: var(--ink-2); max-width: 60ch; }
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: clamp(0.7rem, 2vw, 1rem);
}
.ind-name { font-size: 0.86rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.ind-meta { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font-size: 0.74rem; font-weight: 600; color: var(--ink-3); }
.delta { font-variant-numeric: tabular-nums; }

.pyramid-wrap { height: clamp(360px, 70vw, 440px); }

/* ---------- Nivo 3: kazalnik ---------- */
.ind-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.8rem 1.5rem; margin-bottom: 1rem; }
.ind-hero h2 { margin: 0; font-size: clamp(1.35rem, 3.8vw, 1.7rem); letter-spacing: -0.015em; }
.ind-hero .ind-note { margin: 0.2rem 0 0; font-size: 0.85rem; color: var(--ink-3); }
.ind-now { text-align: right; }
.ind-now .big { font-size: clamp(2rem, 7vw, 2.6rem); }

.controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 1rem; margin-bottom: 0.8rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-size: 0.78rem; font-weight: 600; color: var(--ink-2);
  background: var(--tint); border: 1px solid transparent; border-radius: 999px;
  padding: 0.35rem 0.8rem 0.35rem 0.6rem; cursor: pointer;
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.chip::before {
  content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; flex: none;
  background: transparent; border: 2px solid var(--c, var(--ink-3));
}
.chip[aria-pressed="true"] { color: var(--ink); background: var(--card); border-color: var(--line); box-shadow: var(--shadow-sm); }
.chip[aria-pressed="true"]::before { background: var(--c, var(--ink-3)); }
.chip:disabled { opacity: 0.45; cursor: not-allowed; }
.chip.is-home, .chip.is-home:disabled { cursor: default; opacity: 1; }

.ind-chart { height: clamp(250px, 50vw, 330px); }

.strip-wrap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-sm); padding: 1rem 1.1rem 0.8rem;
}
.strip-text { margin: 0 0 0.6rem; font-size: 0.92rem; color: var(--ink-2); }
.strip-text b { color: var(--ink); }
.strip { display: block; max-width: 100%; overflow: visible; }
.strip .dot { fill: var(--cmp-dot); }
.strip .dot.cmp { stroke: var(--card); stroke-width: 2; }
.strip .axis { stroke: var(--line); stroke-width: 1; }
.strip text { font-family: var(--font-sans); font-size: 11px; font-weight: 600; fill: var(--ink-3); }
.strip text.home-label { fill: var(--ink); font-weight: 700; }
.strip .hit { fill: transparent; cursor: default; }
.strip-tip {
  position: absolute; pointer-events: none; z-index: 2;
  background: var(--ink); color: var(--card); font-size: 0.78rem; font-weight: 600;
  border-radius: 8px; padding: 0.3rem 0.55rem; white-space: nowrap;
  transform: translate(-50%, -120%);
}
.strip-holder { position: relative; }

.sibling-nav { display: flex; justify-content: space-between; gap: 0.6rem; margin-top: 1.4rem; flex-wrap: wrap; }
.sibling-nav a {
  font-size: 0.82rem; font-weight: 700; color: var(--blue-deep); text-decoration: none;
  background: var(--tint); border-radius: 999px; padding: 0.42rem 0.95rem;
}
.sibling-nav a:hover { background: var(--tint-2); color: var(--blue); }

/* Tabela vrednosti (besedilna alternativa grafu) */
.data-table { margin-top: 1rem; }
.data-table summary { cursor: pointer; font-size: 0.85rem; font-weight: 700; color: var(--blue-deep); }
.table-scroll { overflow-x: auto; margin-top: 0.6rem; }
.data-table table { border-collapse: collapse; width: 100%; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 0.35rem 0.6rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table thead th { color: var(--ink-3); font-weight: 700; }

@media (max-width: 560px) {
  .ind-now { text-align: left; }
}

/* ---------- Povzetek in vprašanja za kandidate ---------- */
.summary-sec { margin-top: 0; }
.sum-list, .ask-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.sum-list { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.sum-list li {
  background: var(--tint-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 0.8rem 1rem 0.85rem;
}
.sum-list a { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.5rem; text-decoration: none; color: inherit; }
.sum-list a:hover .sum-name { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.sum-name { font-size: 0.86rem; font-weight: 700; color: var(--blue-deep); flex-basis: 100%; }
.sum-val { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.sum-year { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); }
.sum-list p { margin: 0.3rem 0 0; font-size: 0.84rem; color: var(--ink-2); }
.sum-list b { color: var(--ink); font-variant-numeric: tabular-nums; }

.ask-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.4rem 1rem; flex-wrap: wrap;
  border-left: 3px solid var(--blue); background: var(--tint); border-radius: 0 var(--r) var(--r) 0;
  padding: 0.65rem 1rem;
}
.ask-list p { margin: 0; flex: 1 1 22rem; font-size: 0.92rem; color: var(--ink); }
.ask-list a { font-size: 0.78rem; font-weight: 700; color: var(--blue-deep); text-decoration: none; white-space: nowrap; }
.ask-list a:hover { color: var(--blue); }

.ind-explain {
  margin: -0.2rem 0 1rem; max-width: 70ch; font-size: 0.92rem; color: var(--ink-2);
}
.ind-explain b { color: var(--ink); }
.ask-box {
  margin-top: 1.4rem; border-left: 3px solid var(--blue); background: var(--tint);
  border-radius: 0 var(--r) var(--r) 0; padding: 0.75rem 1rem;
}
.ask-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue-deep); }
.ask-box p { margin: 0.25rem 0 0; color: var(--ink); }

/* ---------- Kam se vozimo na delo ---------- */
.commute { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.commute li { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr 4rem; align-items: center; gap: 0.7rem; font-size: 0.86rem; }
.cm-name { font-weight: 600; color: var(--ink); }
.cm-bar { height: 14px; background: var(--tint); border-radius: 4px; overflow: hidden; }
.cm-bar span { display: block; height: 100%; background: var(--cmp-home); border-radius: 4px; }
.cm-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }

/* Dom za starejše, brezposelnost: dejstva v dveh stolpcih */
.dso-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.6rem; margin-bottom: 0.9rem; list-style: none; padding: 0; }
.dso-facts > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.5rem; background: var(--tint-2); border: 1px solid var(--line); border-radius: var(--r); padding: 0.8rem 1rem 0.85rem; }
.dso-facts p { margin: 0.3rem 0 0; flex-basis: 100%; font-size: 0.84rem; color: var(--ink-2); }
