/* Toolbox UI layer: shared audience bar, municipality workspace and section rhythm.
   Values mirror the kindergarten (.tk2-*) view so every audience reads the same. */
.audience {
  max-width: 1320px;
  margin-inline: auto;
  padding: 26px 42px;
  border-radius: 22px;
  background: #eef6fb;
  box-sizing: border-box;
}
.audience h2 { font-size: 32px; line-height: 1.1; margin: 0 0 6px; }
.audience p { font-size: 15px; margin: 0; }
.audience label { font-size: 0; font-weight: 700; } /* label text kept for assistive tech, hidden visually like .tk2-sr */
.audience label select { font-size: 15px; font-weight: 800; }
.layout { max-width: 1320px; margin-inline: auto; box-sizing: border-box; }
#actions > h2 { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.05; letter-spacing: -0.02em; }
#directions > * { min-height: 112px; border-radius: 18px; }

/* WHO direction cards: identical to the kindergarten/audience view (.tk2-direction). */
#municipality-workspace #directions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
#municipality-workspace .wd-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 0;
  padding: 20px;
  border: 1px solid #dce1e5;
  border-radius: 16px;
  color: #15354a;
  text-align: left;
  box-shadow: 0 4px 14px rgb(24 58 79 / 6%);
  background-color: #fff;
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(#ffffffeb, #ffffffeb), var(--wd-art);
  transition: background 160ms, border-color 160ms, transform 180ms ease, box-shadow 180ms ease;
}
#municipality-workspace .wd-card[data-theme='society'] { --wd-art: url('./municipality/assets/directions/society.png'); }
#municipality-workspace .wd-card[data-theme='environment'] { --wd-art: url('./municipality/assets/directions/environment.png'); }
#municipality-workspace .wd-card[data-theme='people'] { --wd-art: url('./municipality/assets/directions/people.png'); }
#municipality-workspace .wd-card[data-theme='systems'] { --wd-art: url('./municipality/assets/directions/systems.png'); }
#municipality-workspace .wd-card strong { display: block; max-width: 190px; font: 700 20px/1.15 'Fira Sans', sans-serif; }
#municipality-workspace .wd-code {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--wd-color) 85%, black);
  border-radius: 50%;
  background: color-mix(in srgb, var(--wd-color) 8%, white);
  font-size: 12px;
  font-weight: 900;
  transition: background 160ms, color 160ms;
}
#municipality-workspace .wd-description { color: #425d70; font: 400 13px/1.5 'Nunito Sans', sans-serif; }
#municipality-workspace .wd-card[aria-pressed='true'] {
  background-image: linear-gradient(color-mix(in srgb, var(--wd-color) 12%, white), color-mix(in srgb, var(--wd-color) 12%, white)), var(--wd-art);
  border-color: var(--wd-color);
}
#municipality-workspace .wd-card:not([aria-pressed='true']):hover,
#municipality-workspace .wd-card:not([aria-pressed='true']):focus-visible { border-color: #a4afb8; }
#municipality-workspace .wd-card:hover .wd-code,
#municipality-workspace .wd-card:focus-visible .wd-code,
#municipality-workspace .wd-card[aria-pressed='true'] .wd-code { background: var(--wd-color); color: #fff; }
@media (max-width: 1100px) { #municipality-workspace #directions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { #municipality-workspace .wd-card { padding: 14px; } #municipality-workspace .wd-card strong { font-size: 18px; } }

/* Same frame and inner gutter as .tk2-library (full width up to the content max) so WHO cards match in every audience. */
body.liigume-toolbox-page #municipality-workspace > .layout {
  width: 100%;
  padding-inline: clamp(20px, 4vw, 60px);
  box-sizing: border-box;
}
@media (max-width: 520px) {
  body.liigume-toolbox-page #municipality-workspace > .layout { padding-inline: 20px; }
}

/* Large section heading and count chip, same as .tk2-section-heading / .tk2-count. */
#municipality-workspace #actions > .section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 36px;
}
#municipality-workspace #actions > .section-heading > div { max-width: 760px; }
#municipality-workspace #actions > .section-heading .eyebrow { margin: 0 0 8px; color: #0066a1; }
#municipality-workspace #actions > .section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -0.025em;
  line-height: 1.06;
}
#municipality-workspace #actions > .section-heading p:not(.eyebrow):not(.count-chip) { margin: 0; color: #425d70; font-size: 17px; }
#municipality-workspace .count-chip {
  flex-shrink: 0;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef3f6;
  color: #425d70;
  font-size: 13px;
  font-weight: 800;
}
#municipality-workspace #action-count { display: none; }
#municipality-workspace .advanced-filters > .filter-summary { display: none; }
@media (max-width: 760px) {
  #municipality-workspace #actions > .section-heading { display: block; }
  #municipality-workspace .count-chip { display: inline-block; margin-top: 16px; }
}

/* Practice cards: same proportions and typography as .tk2-card. */
#municipality-workspace #cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 1000px) { #municipality-workspace #cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { #municipality-workspace #cards { grid-template-columns: minmax(0, 1fr); } }
#municipality-workspace #cards .card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dce1e5;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 13px 32px rgb(24 58 79 / 8%);
}
#municipality-workspace #cards .card .cover { height: 210px; min-height: 210px; position: relative; }
#municipality-workspace #cards .card .cover .index {
  position: absolute;
  top: 16px;
  left: 16px;
  min-width: 48px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgb(255 255 255 / 92%);
  color: #15354a;
  font: 800 17px/1.25 'Fira Sans', sans-serif;
  text-align: center;
}
#municipality-workspace #cards .card .cover .kind {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgb(21 53 74 / 78%);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.04em;
}
#municipality-workspace #cards .card .cardbody { flex: 1; display: flex; flex-direction: column; padding: 24px; gap: 0; }
#municipality-workspace #cards .card .place-label { margin: 0 0 8px; font-size: 12px; font-weight: 800; color: #587083; }
#municipality-workspace #cards .card .cardbody > .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: #15354a;
}
#municipality-workspace #cards .card .cardbody > .eyebrow::before {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tone, #0878bd);
}
#municipality-workspace #cards .card h3 { margin: 15px 0 9px; font-size: 24px; line-height: 1.16; }
#municipality-workspace #cards .card .cardbody > p:not(.eyebrow):not(.place-label):not(.evidence-label) { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: #587083; }
#municipality-workspace #cards .card .evidence-label { margin: 0 0 12px; font-size: 12px; }
#municipality-workspace .wd-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; }
#municipality-workspace .wd-tag {
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone, #0878bd) 12%, white);
  color: #15354a;
  font-size: 11px;
  font-weight: 800;
}
#municipality-workspace #cards .card .cardbody > button { margin-top: auto; padding-top: 10px; border-top: 1px solid #d8e4eb; font-size: 14px; font-weight: 900; color: #07537e; }

/* Practice overlay: same shell, hero and section rhythm as .tk2-dialog. */
#detail.practice-detail {
  width: min(960px, calc(100% - 38px));
  max-width: 960px;
  border-radius: 26px;
  box-shadow: 0 30px 120px rgb(3 22 36 / 58%);
}
#detail.practice-detail .modalhead {
  min-height: 330px;
  padding: 92px clamp(20px, 6vw, 60px) 42px;
  border-bottom: 0;
}
#detail.practice-detail .modalhead h2 {
  margin: 12px 0 8px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.025em;
}
#detail.practice-detail .modalbody { padding: 34px clamp(20px, 6vw, 60px) 54px; }
#detail.practice-detail .modalbody h3 { margin: 0 0 14px; font-size: 24px; }
#detail.practice-detail .modalbody > section,
#detail.practice-detail .modalbody > h3 { }
#detail.practice-detail .modalbody > section + section,
#detail.practice-detail .modalbody > section + h3 { margin-top: 0; padding-top: 28px; border-top: 1px solid #dce1e5; }
#detail.practice-detail .modalbody > h3 { margin-top: 28px; padding-top: 28px; border-top: 1px solid #dce1e5; }
#detail.practice-detail .modalbody > section:first-child { padding-bottom: 28px; }
#detail.practice-detail .modalhead.has-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(8 38 57 / 86%), rgb(8 38 57 / 34%));
  pointer-events: none;
}
#detail.practice-detail .modalbody small { display: block; margin: 6px 0 22px; }

/* Overlay quick facts and numbered steps (same look as .tk2-fact / .tk2-step-list). */
#detail.practice-detail .wd-quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}
#detail.practice-detail .wd-fact { padding: 16px; border: 1px solid #dce1e5; border-radius: 14px; background: #f3f8fb; }
#detail.practice-detail .wd-fact span {
  display: block;
  margin-bottom: 4px;
  color: #587083;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#detail.practice-detail .wd-fact strong { display: block; font-size: 14px; }
#detail.practice-detail .modalbody > .practice-facts .badge,
#detail.practice-detail .modalbody > p.badge { display: none; }
#detail.practice-detail .modalbody > ol { margin: 0 0 8px; padding: 0; list-style: none; counter-reset: wd-step; }
#detail.practice-detail .modalbody > ol > li {
  position: relative;
  min-height: 48px;
  margin: 0 0 14px;
  padding: 4px 0 0 58px;
  counter-increment: wd-step;
}
#detail.practice-detail .modalbody > ol > li::before {
  content: counter(wd-step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--practice-tone, #0878bd) 16%, white);
  color: #15354a;
  font-weight: 900;
}
@media (max-width: 640px) { #detail.practice-detail .wd-quick-facts { grid-template-columns: 1fr; } }

@media (max-width: 640px) { #municipality-workspace #cards .card .cover { height: 190px; min-height: 190px; } }

/* Focus ring: same amber ring as the kindergarten content area (site header keeps its own). */
#municipality-workspace :is(button, input, select, textarea, a, summary):focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}
#detail :is(button, input, select, textarea, a, summary):focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a:focus-visible { outline: 3px solid #ffbf47; outline-offset: -3px; }

/* Selected WHO card: corner tick, as in .tk2-direction[aria-pressed='true']. */
#municipality-workspace .wd-card[aria-pressed='true'] .wd-code::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 38px;
  height: 38px;
  border-left: 1px solid var(--wd-color);
  border-bottom: 1px solid var(--wd-color);
  border-radius: 0 15px 0 12px;
  background: color-mix(in srgb, var(--wd-color) 20%, white);
  pointer-events: none;
}
#municipality-workspace .wd-card[aria-pressed='true'] .wd-code::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 14px;
  width: 9px;
  height: 15px;
  border-right: 2px solid #15354a;
  border-bottom: 2px solid #15354a;
  border-radius: 1px;
  transform: rotate(45deg);
  pointer-events: none;
}

/* Municipality workstation navigation: one quiet segmented bar instead of three floating cards. */
body.liigume-toolbox-page #municipality-workspace > .layout > aside { margin: 0 0 40px; }
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border: 1px solid #dce1e5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgb(24 58 79 / 6%);
  overflow: hidden;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav .eyebrow {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 24px 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #526d7f;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a {
  min-height: 64px;
  padding: 14px 24px 16px;
  gap: 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  font-size: 15px;
  font-weight: 700;
  color: #31566d;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a + a { border-left: 1px solid #e6ebee; }
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a[aria-current='location'] {
  background: #f3f8fb;
  border-bottom-color: #0878bd;
  color: #005b89;
  box-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a:hover {
    transform: none;
    box-shadow: none;
    background: #f6fafc;
    border-color: transparent;
    border-bottom-color: #a9cbe0;
    color: #005b89;
  }
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a[aria-current='location']:hover { border-bottom-color: #0878bd; }
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a + a:hover { border-left-color: #e6ebee; }
}
@media (max-width: 760px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a {
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    min-height: 96px;
    padding: 12px 6px;
    text-align: center;
    font-size: 13px;
    line-height: 1.25;
  }
}

/* Workstation tabs: grey icon inside its own round grey ring with a soft shadow; labels and states stay blue. */
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a::before {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  border: 1.5px solid #c3ccd3;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgb(23 62 87 / 14%);
  -webkit-mask: none;
  mask: none;
  color: inherit;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a::after {
  content: '';
  position: absolute;
  top: calc(50% - 1.5px - 11px);
  left: 34px;
  width: 22px;
  height: 22px;
  background: #78808a;
  -webkit-mask: var(--municipality-section-icon) center / contain no-repeat;
  mask: var(--municipality-section-icon) center / contain no-repeat;
  pointer-events: none;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a[aria-current='location']::before { border-color: #c3ccd3; color: inherit; }
@media (max-width: 760px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a::after {
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Workstation navigation as a pill toggle with icons (replaces the segmented bar and round icon rings above). */
body.liigume-toolbox-page #municipality-workspace > .layout > aside { margin: 0 0 36px; }
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  max-width: 760px;
  padding: 4px;
  border: 1px solid #cfd8de;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgb(23 62 87 / 7%);
  overflow: visible;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav .eyebrow {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a,
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a + a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  transform: none;
  color: #0071b5;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  transition: background 160ms, color 160ms;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a::before {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: currentColor;
  box-shadow: none;
  color: inherit;
  -webkit-mask: var(--municipality-section-icon) center / contain no-repeat;
  mask: var(--municipality-section-icon) center / contain no-repeat;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a::after { content: none; }
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a[aria-current='location'],
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a[aria-current='location']:hover {
  background: #0071b5;
  border: 0;
  color: #fff;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a[aria-current='location']::before { color: #fff; }
@media (hover: hover) and (pointer: fine) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a:not([aria-current='location']):hover {
    background: #eaf4fa;
    color: #005b89;
    border: 0;
    transform: none;
    box-shadow: none;
  }
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
@media (max-width: 760px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { border-radius: 30px; }
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a,
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a + a {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 64px;
    padding: 8px 4px;
    border-radius: 26px;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.02em;
  }
}
@media (min-width: 761px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { max-width: 920px; }
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a { white-space: nowrap; }
}

/* Toggle hover: white inside, light grey outline with soft shadow, slight zoom. */
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a { transition: background 160ms, color 160ms, box-shadow 180ms ease, transform 180ms ease; }
@media (hover: hover) and (pointer: fine) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a:not([aria-current='location']):hover {
    background: #fff;
    color: #0071b5;
    transform: scale(1.03);
    box-shadow: 0 0 0 1.5px #c3ccd3, 0 6px 16px rgb(23 62 87 / 14%);
    z-index: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a { transition: none; }
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a:hover { transform: none !important; }
}

/* More room inside the toggle so hovered tabs (outline + zoom) never touch the outer border or each other. */
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { padding: 9px; gap: 12px; }
@media (max-width: 760px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { padding: 7px; gap: 8px; }
}

/* Equal inner margin on all four sides of the toggle; hovered tab keeps a clear gap to the outer edge. */
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { padding: 14px; gap: 14px; }
@media (hover: hover) and (pointer: fine) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a:not([aria-current='location']):hover { transform: scale(1.02); }
}
@media (max-width: 760px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { padding: 10px; gap: 8px; }
}

/* Space between the toggle and the section eyebrow/heading. */
body.liigume-toolbox-page #municipality-workspace > .layout > aside { margin-bottom: 56px; }
@media (max-width: 760px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside { margin-bottom: 40px; }
}

/* ---- Töölaud (workbench): calmer, roomier navigation and context fields ---- */
#municipality-workspace .wb-shell { box-shadow: 0 10px 30px rgb(24 58 79 / 8%); }
#municipality-workspace .wb-top { padding: 26px 36px; align-items: center; }
#municipality-workspace .wb-audience-switch { display: flex; align-items: center; gap: 12px; }
#municipality-workspace .wb-audience-switch label { font-size: 13px; font-weight: 800; color: #425d70; white-space: nowrap; }
#municipality-workspace .wb-audience-switch select { min-width: 220px; min-height: 48px; padding: 12px 44px 12px 18px; }

/* Primary boards: one toggle bar, no arrow circles, labels never break mid-word. */
#municipality-workspace .wb-primary {
  display: grid;
  grid-template-columns: repeat(5, minmax(max-content, 1fr));
  gap: 10px;
  padding: 14px 36px;
  border-bottom: 1px solid #dce1e5;
  background: #fff;
  overflow-x: auto;
  scrollbar-width: thin;
}
#municipality-workspace .wb-primary a,
#municipality-workspace .wb-primary a:hover {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
  color: #0071b5;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  transition: background 160ms, color 160ms, box-shadow 180ms ease, transform 180ms ease;
}
#municipality-workspace .wb-primary .toolbox-link-arrow,
#municipality-workspace .wb-secondary .toolbox-link-arrow { display: none !important; }
#municipality-workspace .wb-primary a .wb-icon { width: 26px; height: 26px; color: #0071b5; }
#municipality-workspace .wb-primary a .wb-icon svg { width: 24px; height: 24px; filter: none; }
#municipality-workspace .wb-primary a[aria-current='page'],
#municipality-workspace .wb-primary a[aria-current='page']:hover {
  border-color: #0071b5;
  background: #0071b5;
  color: #fff;
}
#municipality-workspace .wb-primary a[aria-current='page'] .wb-icon { color: #fff; }
@media (hover: hover) and (pointer: fine) {
  #municipality-workspace .wb-primary a:not([aria-current='page']):hover {
    background: #fff;
    border-color: #c3ccd3;
    box-shadow: 0 6px 16px rgb(23 62 87 / 14%);
    transform: scale(1.02);
  }
}
#municipality-workspace .wb-primary a:focus-visible,
#municipality-workspace .wb-secondary a:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

/* Sub-views inside the coloured banner. */
#municipality-workspace .wb-branch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  padding: 22px 36px;
}
#municipality-workspace .wb-branch-label { display: flex; align-items: center; gap: 14px; font-size: 20px; }
#municipality-workspace .wb-secondary { display: flex; flex-wrap: wrap; gap: 10px; }
#municipality-workspace .wb-secondary a,
#municipality-workspace .wb-secondary a:hover {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 999px;
  background: rgb(255 255 255 / 12%);
  box-shadow: none;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
#municipality-workspace .wb-secondary a:hover { background: rgb(255 255 255 / 24%); }
#municipality-workspace .wb-secondary a[aria-current='page'],
#municipality-workspace .wb-secondary a[aria-current='page']:hover { background: #fff; border-color: #fff; color: #00598c; }

/* Region and year fields. */
#municipality-workspace .wb-context { padding: 24px 36px; }
#municipality-workspace .wb-context-fields {
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  gap: 20px 28px;
  align-items: end;
}
#municipality-workspace .wb-context label { display: grid; gap: 8px; font-size: 13px; font-weight: 800; color: #425d70; }
#municipality-workspace .wb-context select,
#municipality-workspace .wb-context input { width: 100%; min-height: 48px; }

@media (max-width: 760px) {
  #municipality-workspace .wb-top { padding: 20px; flex-wrap: wrap; }
  #municipality-workspace .wb-audience-switch { width: 100%; }
  #municipality-workspace .wb-audience-switch select { flex: 1; min-width: 0; }
  #municipality-workspace .wb-primary { display: flex; padding: 12px 20px; scroll-snap-type: x proximity; }
  #municipality-workspace .wb-primary a { flex: 0 0 auto; scroll-snap-align: start; }
  #municipality-workspace .wb-branch { padding: 18px 20px; }
  #municipality-workspace .wb-context { padding: 20px; }
}

/* Breadcrumb as a plain trail, readable size. */
#municipality-workspace .wb-breadcrumb { font-size: 13px; gap: 10px; margin-bottom: 28px; }
#municipality-workspace .wb-breadcrumb a,
#municipality-workspace .wb-breadcrumb a:hover {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #0071b5;
  font-weight: 800;
  text-decoration: none;
}
#municipality-workspace .wb-breadcrumb a:hover { text-decoration: underline; }
#municipality-workspace .wb-breadcrumb .toolbox-link-arrow { display: none !important; }
#municipality-workspace .wb-body { padding: 32px 36px 40px; }
@media (max-width: 760px) { #municipality-workspace .wb-body { padding: 24px 20px 32px; } }
#municipality-workspace .wb-body .wb-breadcrumb a.toolbox-circle-link,
#municipality-workspace .wb-body .wb-breadcrumb a.toolbox-circle-link:hover {
  display: inline !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Töölaud: no zoom on hover, keep the outline and shadow only. */
@media (hover: hover) and (pointer: fine) {
  #municipality-workspace .wb-primary a:not([aria-current='page']):hover,
  #municipality-workspace .wb-secondary a:hover { transform: none; }
}
#municipality-workspace .wb-primary a,
#municipality-workspace .wb-secondary a { transition: background 160ms, color 160ms, border-color 160ms, box-shadow 180ms ease; }

/* Töölaud tabs: make the toggle styles win over the older workbench/explorer rules. */
#municipality-workspace .wb-shell .wb-primary a {
  justify-content: center !important;
  gap: 10px !important;
  background: #fff !important;
  border: 1px solid transparent !important;
  color: #0071b5 !important;
}
#municipality-workspace .wb-shell .wb-primary a .wb-icon { color: #0071b5 !important; }
#municipality-workspace .wb-shell .wb-primary a[aria-current='page'],
#municipality-workspace .wb-shell .wb-primary a[aria-current='page']:hover {
  background: #0071b5 !important;
  border-color: #0071b5 !important;
  color: #fff !important;
}
#municipality-workspace .wb-shell .wb-primary a[aria-current='page'] .wb-icon { color: #fff !important; }
#municipality-workspace .wb-shell .wb-primary a:not([aria-current='page']):hover {
  border-color: #c3ccd3 !important;
  background: #fff !important;
  transform: none !important;
}
#municipality-workspace .wb-shell .wb-secondary a { justify-content: center !important; }
#municipality-workspace .wb-shell .wb-secondary a[aria-current='page'],
#municipality-workspace .wb-shell .wb-secondary a[aria-current='page']:hover { background: #fff !important; color: #00598c !important; border-color: #fff !important; }

/* Töölaud tabs: every tab has the same width at any shell width, so nothing resizes on hover/active changes. */
#municipality-workspace .wb-shell .wb-primary {
  grid-template-columns: repeat(5, minmax(176px, 1fr));
  gap: 6px;
  padding: 14px 24px;
}
#municipality-workspace .wb-shell .wb-primary a {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 14px;
  gap: 8px !important;
  font-size: 13px;
}
#municipality-workspace .wb-shell .wb-primary a .wb-icon { width: 22px; height: 22px; }
#municipality-workspace .wb-shell .wb-primary a .wb-icon svg { width: 22px; height: 22px; }
@media (max-width: 760px) {
  #municipality-workspace .wb-shell .wb-primary { display: grid; grid-template-columns: repeat(5, 176px); padding: 12px 20px; }
}

/* Töölaud tab bar: fixed height. No transform on any tab or icon, shadow and focus ring fit inside the bar, no vertical overflow. */
#municipality-workspace .wb-shell .wb-primary {
  padding: 16px 24px;
  overflow-x: auto;
  overflow-y: hidden;
}
#municipality-workspace .wb-shell .wb-primary a,
#municipality-workspace .wb-shell .wb-primary a:hover,
#municipality-workspace .wb-shell .wb-primary a:focus-visible,
#municipality-workspace .wb-shell .wb-primary a[aria-current='page']:hover,
#municipality-workspace .wb-shell .wb-primary a:hover .wb-icon,
#municipality-workspace .wb-shell .wb-primary a .wb-icon {
  transform: none !important;
  z-index: auto;
}
#municipality-workspace .wb-shell .wb-primary a:not([aria-current='page']):hover { box-shadow: 0 3px 8px rgb(23 62 87 / 14%) !important; }
#municipality-workspace .wb-shell .wb-primary a { min-height: 52px; height: 52px; }

/* Töölaud flow: numbered steps (understand, compare, test, budget, act) and a next-step bar. */
#municipality-workspace .wb-shell .wb-primary a .wb-step-no {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
#municipality-workspace .wb-branch-text { display: grid; gap: 2px; }
#municipality-workspace .wb-stage {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}
#municipality-workspace .wb-branch-text strong { font-size: 20px; }
#municipality-workspace .wb-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
  padding: 24px 28px;
  border: 1px solid #dce1e5;
  border-radius: 18px;
  background: #f3f8fb;
}
#municipality-workspace .wb-next .wb-stage { color: #587083; margin-bottom: 4px; }
#municipality-workspace .wb-next strong { display: block; font-size: 18px; color: #15354a; }
#municipality-workspace .wb-next p { margin: 4px 0 0; color: #587083; font-size: 14px; }
#municipality-workspace .wb-next-note { margin: 0; flex: 1; }
#municipality-workspace .wb-next a.wb-next-link,
#municipality-workspace .wb-next a.wb-next-link:hover {
  display: inline-flex !important;
  align-items: center;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 12px 24px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #0071b5 !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: none !important;
}
#municipality-workspace .wb-next a.wb-next-link:hover { background: #005b94 !important; }
#municipality-workspace .wb-next a.wb-next-link .toolbox-link-arrow { display: none !important; }
@media (max-width: 760px) {
  #municipality-workspace .wb-next { flex-direction: column; align-items: stretch; padding: 20px; }
  #municipality-workspace .wb-next a.wb-next-link { justify-content: center; }
}

#municipality-workspace .wb-branch .wb-stage { color: rgb(255 255 255 / 88%); opacity: 1; }
#municipality-workspace .wb-branch-text strong { color: #fff; }

/* Töölaud tabs: only the step number 1-5; the board icon appears only in the opened section banner. */
#municipality-workspace .wb-shell .wb-primary a .wb-icon { display: none !important; }
#municipality-workspace .wb-shell .wb-primary a .wb-step-no {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  font-size: 13px;
}
#municipality-workspace .wb-shell .wb-primary a { gap: 10px !important; }

/* Töölaud step numbers: larger grey number in a thicker grey ring with a soft shadow. */
#municipality-workspace .wb-shell .wb-primary a .wb-step-no {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  border: 2.5px solid #aeb7bf;
  background: #fff;
  box-shadow: 0 2px 6px rgb(23 62 87 / 18%);
  color: #6a737d;
  font-size: 17px;
  font-weight: 900;
}
#municipality-workspace .wb-shell .wb-primary a[aria-current='page'] .wb-step-no {
  border-color: #fff;
  background: #fff;
  color: #6a737d;
  box-shadow: 0 2px 6px rgb(0 40 80 / 30%);
}
/* Padding follows the content: less on the ring side, more after the label. */
#municipality-workspace .wb-shell .wb-primary a {
  gap: 12px !important;
  padding: 8px 22px 8px 10px;
  justify-content: flex-start !important;
}
@media (min-width: 761px) {
  #municipality-workspace .wb-shell .wb-primary a { justify-content: center !important; padding: 8px 20px 8px 12px; }
}

/* Töölaud head: the banner photo shows faintly (10%) behind the title, boards and region fields. */
#municipality-workspace .wb-head {
  background:
    linear-gradient(rgb(255 255 255 / 90%), rgb(255 255 255 / 90%)),
    url('./municipality/assets/Kaariku.jpeg') center 55% / cover no-repeat;
}
#municipality-workspace .wb-head > .wb-top,
#municipality-workspace .wb-head > .wb-primary,
#municipality-workspace .wb-head > .wb-context { background: transparent !important; }
#municipality-workspace .wb-head > .wb-top { border-bottom-color: rgb(195 204 211 / 55%); }
#municipality-workspace .wb-head > .wb-primary { border-bottom-color: rgb(195 204 211 / 55%); }
/* Buttons and fields over the photo: background 20% transparent, text stays solid. */
#municipality-workspace .wb-head .wb-logo { background: rgb(228 241 250 / 80%) !important; }
#municipality-workspace .wb-shell .wb-head .wb-primary a { background: rgb(255 255 255 / 80%) !important; }
#municipality-workspace .wb-shell .wb-head .wb-primary a[aria-current='page'],
#municipality-workspace .wb-shell .wb-head .wb-primary a[aria-current='page']:hover { background: rgb(0 113 181 / 80%) !important; }
#municipality-workspace .wb-shell .wb-head .wb-primary a:not([aria-current='page']):hover { background: rgb(255 255 255 / 92%) !important; }
#municipality-workspace .wb-head :is(.wb-audience-switch select, .wb-context select, .wb-context input) { background-color: rgb(255 255 255 / 80%) !important; }

/* Töölaud boards on narrow screens: one row of equal tabs that scrolls sideways; ring and label stay on one line. */
@media (max-width: 600px) {
  #municipality-workspace .wb-shell .wb-head > .wb-primary {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 20px;
  }
  #municipality-workspace .wb-shell .wb-head > .wb-primary a {
    flex: 0 0 188px !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    width: 188px;
    height: 52px;
    min-height: 52px;
    padding: 8px 14px 8px 10px;
    text-align: left;
    white-space: nowrap;
  }
  #municipality-workspace .wb-shell .wb-head > .wb-primary a > span:last-child { white-space: nowrap; }
}

/* Töölaud boards on tablet / small laptop widths: five equal tabs, ring above the label, nothing cut off. */
@media (min-width: 601px) and (max-width: 1100px) {
  #municipality-workspace .wb-shell .wb-head > .wb-primary {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 8px;
    padding: 14px 16px;
    overflow: visible;
  }
  #municipality-workspace .wb-shell .wb-head > .wb-primary a {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center;
    gap: 6px !important;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 88px;
    padding: 10px 6px;
    border-radius: 24px;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.25;
    white-space: normal;
  }
  #municipality-workspace .wb-shell .wb-head > .wb-primary a .wb-step-no { flex: 0 0 34px; width: 34px; height: 34px; font-size: 16px; }
  #municipality-workspace .wb-shell .wb-head > .wb-primary a > span:last-child { white-space: normal; overflow-wrap: anywhere; }
}

/* Estonia map in the Töölaud title: blue contour only, 80% opaque, larger, no tile behind it. */
#municipality-workspace .wb-head .wb-top .wb-logo {
  width: 72px;
  height: 58px;
  border-radius: 0;
  background: none !important;
  box-shadow: none;
}
#municipality-workspace .wb-head .wb-top .wb-estonia {
  width: 72px;
  height: 54px;
  background: url('./municipality/assets/estonia-outline.svg') center / contain no-repeat;
  -webkit-mask: none;
  mask: none;
  opacity: 0.8;
}
@media (max-width: 600px) {
  #municipality-workspace .wb-head .wb-top .wb-logo { width: 56px; height: 46px; }
  #municipality-workspace .wb-head .wb-top .wb-estonia { width: 56px; height: 42px; }
}

/* Expandable sections: circle with a down arrow when closed, turns over when open (replaces the small triangle). */
#municipality-workspace details > summary,
#detail details > summary{
  position: relative;
  padding-right: 68px;
  list-style: none;
  cursor: pointer;
}
#municipality-workspace details > summary::-webkit-details-marker,
#detail details > summary::-webkit-details-marker{ display: none; }
#municipality-workspace details > summary::marker,
#detail details > summary::marker{ content: ''; }
#municipality-workspace details > summary::after,
#detail details > summary::after{
  content: '';
  position: absolute;
  top: 50%;
  right: 18px;
  width: 36px;
  height: 36px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'><circle cx='18' cy='18' r='17' fill='white' stroke='%23b8c7d1' stroke-width='1.5'/><path d='M18 10v16m-6-6 6 6 6-6' fill='none' stroke='%2307537e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
  transform: translateY(-50%);
  transition: transform 220ms ease;
}
#municipality-workspace details > summary:hover::after,
#detail details > summary:hover::after,
#municipality-workspace details > summary:focus-visible::after,
#detail details > summary:focus-visible::after{ background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'><circle cx='18' cy='18' r='17' fill='white' stroke='%230878bd' stroke-width='1.5'/><path d='M18 10v16m-6-6 6 6 6-6' fill='none' stroke='%2307537e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }
#municipality-workspace details[open] > summary::after,
#detail details[open] > summary::after{ transform: translateY(-50%) rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  #municipality-workspace details > summary::after,
#detail details > summary::after{ transition: none; }
}

/* "Omavalitsus ja aasta" is a plain panel, not an expandable section. */
#municipality-workspace #area-settings > .area-heading { margin: 0 0 16px; font-size: 15px; font-weight: 800; line-height: 1.4; }
#municipality-workspace .wb-context #area-settings > .area-heading { display: none; }

/* Töölaud board tabs: background 15% transparent (85% opaque); text and numbers stay solid. */
#municipality-workspace .wb-shell .wb-head .wb-primary a { background: rgb(255 255 255 / 85%) !important; }
#municipality-workspace .wb-shell .wb-head .wb-primary a[aria-current='page'],
#municipality-workspace .wb-shell .wb-head .wb-primary a[aria-current='page']:hover { background: rgb(0 113 181 / 85%) !important; }
#municipality-workspace .wb-shell .wb-head .wb-primary a:not([aria-current='page']):hover { background: rgb(255 255 255 / 95%) !important; }

/* Glass effect on the Töölaud boards: blurred photo behind, 20-22% transparent fill, text stays crisp. */
#municipality-workspace .wb-head {
  --wb-veil: 78%; /* white veil over the photo: photo shows at about 22% */
  background:
    linear-gradient(rgb(255 255 255 / var(--wb-veil, 78%)), rgb(255 255 255 / var(--wb-veil, 78%))),
    url('./municipality/assets/Kaariku.jpeg') center 55% / cover no-repeat;
}
#municipality-workspace .wb-shell .wb-head .wb-primary a {
  background: rgb(255 255 255 / 78%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
}
#municipality-workspace .wb-shell .wb-head .wb-primary a[aria-current='page'],
#municipality-workspace .wb-shell .wb-head .wb-primary a[aria-current='page']:hover {
  background: rgb(0 113 181 / 80%) !important;
}
#municipality-workspace .wb-shell .wb-head .wb-primary a:not([aria-current='page']):hover { background: rgb(255 255 255 / 90%) !important; }
#municipality-workspace .wb-head :is(.wb-audience-switch select, .wb-context select, .wb-context input) {
  background-color: rgb(255 255 255 / 78%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #municipality-workspace .wb-shell .wb-head .wb-primary a { background: rgb(255 255 255 / 92%) !important; }
  #municipality-workspace .wb-shell .wb-head .wb-primary a[aria-current='page'] { background: rgb(0 113 181 / 95%) !important; }
}

/* Source note: the open-data link is readable and clearly a link. */
#municipality-workspace .toolbox-source-note a { color: #0071b5; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
#municipality-workspace .toolbox-source-note a:hover { color: #005b94; }
#municipality-workspace .toolbox-source-note a { display: inline; padding: 0; border: 0; background: none; box-shadow: none; }

/* "Sellel lehel" toggle: enough room around the icon and the label at every width; labels wrap instead of touching the pill edge. */
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a,
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a + a {
  box-sizing: border-box;
  gap: 12px;
  min-height: 56px;
  padding: 12px 22px;
  white-space: normal;
  text-align: left;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a::before { flex: 0 0 22px; }
@media (max-width: 1100px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a,
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a + a {
    gap: 10px;
    padding: 12px 18px;
    font-size: 13px;
    letter-spacing: 0.02em;
  }
}
@media (max-width: 760px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { padding: 10px; gap: 8px; }
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a,
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a + a {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    min-height: 76px;
    padding: 12px 8px;
    font-size: 12px;
    text-align: center;
    letter-spacing: 0.01em;
  }
}
@media (min-width: 1101px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { max-width: 1100px; }
}
@media (max-width: 480px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 8px;
    border-radius: 32px;
  }
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a,
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a + a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-height: 52px;
    padding: 10px 18px;
    border-left: 0;
    font-size: 13px;
    text-align: left;
  }
}
@media (min-width: 481px) and (max-width: 760px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a,
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a + a { padding: 12px 14px; }
}

/* Data status behind a black "i" button. */
.info-dot {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: 4px 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font: 800 15px/1 'Fira Sans', sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 6px rgb(0 0 0 / 22%);
  transition: background 160ms, transform 160ms;
}
.info-dot::before { content: ''; position: absolute; inset: -9px; } /* 44px touch target */
.info-dot:hover { background: #333; }
.info-dot[aria-expanded='true'] { background: #333; }
.info-dot:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }
.info-dot[hidden] { display: none; }
.official-data-status.is-info-panel { display: none; }
.official-data-status.is-info-panel.is-open {
  display: block;
  width: fit-content;
  max-width: min(100%, 560px);
  margin: 8px 0 12px;
  padding: 10px 14px;
  border: 1px solid #dce1e5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgb(23 62 87 / 14%);
  color: #15354a;
  font-size: 13px;
  line-height: 1.5;
}
@media (prefers-reduced-motion: reduce) { .info-dot { transition: none; } }

/* Perfect circle (global button min-height made it an oval) and an Arial "i". */
.info-dot {
  box-sizing: border-box;
  flex: none;
  width: 28px;
  height: 28px;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px;
  max-height: 28px;
  aspect-ratio: 1 / 1;
  padding: 0 !important;
  border-radius: 50%;
  font: 700 17px/1 Arial, Helvetica, sans-serif;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
}

.info-dot svg { display: block; width: 100%; height: 100%; }

/* Dark grey circle (#46484b) like the reference icon. */
.info-dot { background: #46484b; box-shadow: 0 2px 6px rgb(0 0 0 / 18%); }
.info-dot:hover, .info-dot[aria-expanded='true'] { background: #5b5e62; }

/* The "i" uses the page font. */
.info-dot {
  font: normal 800 17px/1 inherit;font-family: inherit;
  padding-bottom: 1px !important;
  letter-spacing: 0;
}

/* More room around the "i" button, especially under the Töölaud region fields. */
.info-dot { margin: 14px 0 10px; }
#municipality-workspace .wb-context { padding-bottom: 28px; }
#municipality-workspace .wb-context .info-dot { display: grid; place-items: center; margin: 20px 0 6px; }
.official-data-status.is-info-panel.is-open { margin: 10px 0 14px; }
#municipality-workspace .wb-context .official-data-status.is-info-panel.is-open { margin: 12px 0 0; }

/* Keep the four section links together with consistent visual weight. */
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav {
  box-sizing: border-box;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: none;
  gap: 6px;
  padding: 8px;
  border-radius: 999px;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a,
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a + a {
  min-width: 0;
  min-height: 52px;
  padding: 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
  overflow-wrap: normal;
  box-shadow: none;
  transform: none;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a::before {
  content: none;
}
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a:not([aria-current='location']):hover {
  transform: none;
  box-shadow: none;
}
@media (max-width: 760px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a,
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a + a {
    justify-content: center;
    font-size: 14px;
  }
}

/* ---- Streamlined flow: ideas first, one decision workspace ---- */
#indicators.is-merged { display: none; }
.wb-context.is-empty { display: none; }
.db-moved { display: none !important; }
/* two section links instead of three */
body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 480px) { body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 761px) { body.liigume-toolbox-page #municipality-workspace > .layout > aside nav { max-width: 760px; } }

/* Decision bar */
.decision-bar {
  position: sticky;
  top: 88px;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px 22px;
  margin: 0 0 28px;
  padding: 14px 20px;
  border: 1px solid #dce1e5;
  border-radius: 20px;
  background: rgb(255 255 255 / 88%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 8px 24px rgb(23 62 87 / 12%);
}
.db-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; position: relative; }
.db-field { display: grid; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #587083; }
.db-field select { min-height: 44px; min-width: 190px; padding: 8px 40px 8px 14px; font-size: 14px; letter-spacing: 0; text-transform: none; }
.db-fields .info-dot { margin: 0 0 8px; }
.db-fields .official-data-status.is-info-panel.is-open { position: absolute; top: calc(100% + 8px); left: 0; z-index: 5; margin: 0; width: max-content; max-width: min(420px, 90vw); }
.db-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin: 0; padding: 0; list-style: none; }
.db-stats li a {
  display: grid;
  gap: 2px;
  min-width: 82px;
  padding: 6px 12px;
  border-radius: 14px;
  color: #15354a;
  text-align: center;
  text-decoration: none;
  transition: background 160ms;
}
.db-stats li a:hover { background: #eaf4fa; }
.db-stats strong { font: 800 20px/1.1 'Fira Sans', sans-serif; }
.db-stats span { font-size: 11px; font-weight: 700; color: #587083; }
.db-stats li[data-state='attention'] strong { color: #b4492f; }
.db-stats li[data-state='ok'] strong { color: #1f7a45; }
.db-stats li[data-state='empty'] strong { color: #8aa0ae; }
.db-next {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #0071b5;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
}
.db-next:hover { background: #005b94; }
.decision-bar :is(a, select, button):focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
@media (max-width: 1100px) {
  .decision-bar { grid-template-columns: 1fr; }
  .db-stats { justify-content: flex-start; }
  .db-next { justify-content: center; }
}
@media (max-width: 760px) {
  .decision-bar { position: static; padding: 14px; }
  .db-field { flex: 1 1 100%; }
  .db-field select { width: 100%; min-width: 0; }
  .db-stats li a { min-width: 70px; padding: 6px 8px; }
}

/* Per-board question and checklist */
.wb-decision { display: grid; gap: 12px; margin: 0 0 28px; padding: 18px 22px; border: 1px solid #dce1e5; border-radius: 16px; background: #f3f8fb; }
.wb-question { display: grid; gap: 4px; margin: 0; }
.wb-question small { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #587083; }
.wb-question strong { font: 700 20px/1.25 'Fira Sans', sans-serif; color: #15354a; }
.wb-gates { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0; padding: 0; list-style: none; }
.wb-gates li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid #dce1e5; border-radius: 999px; background: #fff; color: #587083; font-size: 13px; font-weight: 700; }
.wb-gate-mark { flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid #b8c7d1; border-radius: 50%; }
.wb-gates li.is-done { color: #15354a; border-color: #bfdcc9; background: #f1faf4; }
.wb-gates li.is-done .wb-gate-mark { border-color: #1f7a45; background: #1f7a45 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
/* finished boards: green check instead of the number */
#municipality-workspace .wb-shell .wb-primary a[data-done] .wb-step-no { border-color: #1f7a45; background: #1f7a45 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 62% no-repeat; font-size: 0; box-shadow: 0 2px 6px rgb(31 122 69 / 30%); }

/* Cards that fit the selected municipality */
#municipality-workspace #cards .card.is-fit { border-color: #bfdcc9; box-shadow: 0 13px 32px rgb(31 122 69 / 14%); }
.fit-chip { display: grid; gap: 2px; margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: #f1faf4; color: #15354a; font-size: 12px; line-height: 1.35; }
.fit-chip strong { color: #1f7a45; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.fit-toggle { margin-right: 12px; }
.fit-toggle[aria-pressed='true'] { background: #1f7a45 !important; border-color: #1f7a45 !important; color: #fff !important; }
.fit-toggle[hidden] { display: none; }
.fit-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid #1f7a45;
  border-radius: 999px;
  background: #fff;
  color: #1f7a45;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.fit-toggle:hover { background: #f1faf4; }
.fit-toggle:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
@media (max-width: 760px) {
  .decision-bar { gap: 10px; padding: 12px; }
  .db-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 10px; }
  .db-fields .db-field:first-child { grid-column: 1 / -1; }
  .db-field select { width: 100%; min-width: 0; }
  .db-fields .info-dot { margin: 0 0 8px; }
  .db-fields .official-data-status.is-info-panel.is-open { position: static; width: auto; grid-column: 1 / -1; }
  .db-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .db-stats li a { min-width: 0; padding: 6px 2px; }
  .db-stats strong { font-size: 17px; }
  .db-stats span { font-size: 10px; line-height: 1.2; }
}

/* Decision bar: summary cards */
.decision-bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'fields next' 'stats stats'; gap: 14px 20px; }
.decision-bar .db-fields { grid-area: fields; }
.decision-bar .db-next { grid-area: next; }
.decision-bar .db-stats { grid-area: stats; }
@media (min-width: 1400px) {
  .decision-bar { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'fields stats next'; }
}
.db-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; justify-content: stretch; }
.db-stats li a {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 11px 14px 12px;
  border: 1px solid #dce1e5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 10px rgb(23 62 87 / 7%);
  text-align: left;
  transition: border-color 160ms, box-shadow 160ms, background 160ms;
}
.db-stats li a:hover { background: #f7fbfd; border-color: #a9cbe0; box-shadow: 0 6px 16px rgb(23 62 87 / 12%); }
.db-label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #587083; }
.db-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: #b8c7d1; }
.db-stats li[data-state='attention'] .db-dot { background: #d9573b; }
.db-stats li[data-state='ok'] .db-dot { background: #1f7a45; }
.db-stats strong { font: 800 26px/1.05 'Fira Sans', sans-serif; letter-spacing: -0.01em; }
.db-stats span.db-label { font-size: 11px; }
.db-meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 2px; }
.db-meter i { height: 5px; border-radius: 99px; background: #dde7ee; }
.db-meter i.is-on { background: #1f7a45; }
@media (max-width: 1100px) { .decision-bar { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'fields' 'stats' 'next'; } }
@media (max-width: 760px) {
  .db-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .db-stats li a { padding: 9px 12px 10px; }
  .db-stats strong { font-size: 22px; }
  .db-stats .db-label { font-size: 10px; }
}
@media (min-width: 761px) {
  .decision-bar { padding: 12px 18px; gap: 10px 20px; }
  .db-stats li a { padding: 8px 14px 9px; gap: 2px; }
  .db-stats strong { font-size: 22px; }
}
/* Layout of the bar by width: two rows (fields + next, then cards) above 760px, stacked below. */
@media (min-width: 761px) {
  .decision-bar { grid-template-columns: minmax(0, 1fr) auto !important; grid-template-areas: 'fields next' 'stats stats' !important; }
}
@media (max-width: 760px) {
  .decision-bar { grid-template-areas: 'fields' 'stats' 'next' !important; grid-template-columns: minmax(0, 1fr) !important; }
  .db-stats li a { padding: 7px 10px 8px; gap: 1px; }
  .db-stats strong { font-size: 19px; }
  .db-label { font-size: 9.5px; letter-spacing: 0.02em; }
  .db-meter { display: none; }
}

/* The decision bar stays in the page flow (not sticky). */
.decision-bar { position: static !important; }

/* ---- "Vali kaardilt": trigger in the bar and the map panel ---- */
.db-map-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: end;
  min-height: 48px;
  margin-bottom: 0;
  padding: 6px 14px 6px 18px;
  border: 1px solid #cfd8de;
  border-radius: 999px;
  background: #fff;
  color: #0071b5;
  font: 800 13px/1.2 'Nunito Sans', sans-serif;
  cursor: pointer;
  transition: border-color 160ms, box-shadow 160ms, background 160ms;
}
.db-map-button:hover { border-color: #a9cbe0; background: #f7fbfd; box-shadow: 0 6px 16px rgb(23 62 87 / 12%); }
.db-map-button:disabled { opacity: 0.55; cursor: progress; }
.db-map-button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }
.db-mini-map { display: grid; place-items: center; width: 56px; min-height: 34px; }
.db-mini-map svg { display: block; width: 56px; height: auto; }
.db-fields .info-dot { align-self: end; margin-bottom: 9px; }

.map-dialog {
  width: min(1040px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: #fff;
  color: #15354a;
  overflow: auto;
  box-shadow: 0 30px 120px rgb(3 22 36 / 58%);
}
.map-dialog::backdrop { background: rgb(8 28 44 / 62%); backdrop-filter: blur(3px); }
.md-head { display: flex; justify-content: space-between; gap: 16px; padding: 22px 28px 14px; background: #eef6fb; border-bottom: 1px solid #dce1e5; }
.md-kicker { margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #587083; }
.md-title { margin: 0; font: 700 28px/1.15 'Fira Sans', sans-serif; }
.md-close { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #15354a; color: #fff; font: 400 26px/1 Arial, sans-serif; cursor: pointer; }
.md-close:hover { background: #254f6d; }
.md-controls { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: end; gap: 16px; padding: 18px 28px 10px; }
.md-field { display: grid; gap: 6px; font-size: 12px; font-weight: 800; color: #425d70; }
.md-field input, .md-field select { min-height: 48px; width: 100%; padding: 10px 14px; border: 1px solid #cfd8de; border-radius: 12px; background: #fff; font: 600 14px 'Nunito Sans', sans-serif; color: #15354a; }
.md-text-button { min-height: 48px; padding: 0 6px; border: 0; background: none; color: #0071b5; font: 800 13px 'Nunito Sans', sans-serif; cursor: pointer; }
.md-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 28px 14px; }
.md-results-title { margin: 0; font: 700 22px/1.2 'Fira Sans', sans-serif; }
.md-count { margin: 2px 0 0; font-size: 13px; color: #587083; }
.md-toggle { display: inline-flex; padding: 4px; border: 1px solid #cfd8de; border-radius: 999px; background: #fff; }
.md-toggle button { min-height: 38px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: #0071b5; font: 800 13px 'Nunito Sans', sans-serif; cursor: pointer; }
.md-toggle button[aria-pressed='true'] { background: #0071b5; color: #fff; }
.md-map { position: relative; margin: 0 28px; border: 1px solid #dce1e5; border-radius: 20px; background: #eaf1f5; overflow: hidden; }
.md-svg { display: block; width: 100%; height: min(58vh, 560px); touch-action: none; cursor: grab; }
.md-svg.is-zoomed { cursor: move; }
.md-shape { stroke: #fff; stroke-width: 1.1; fill-opacity: 0.62; cursor: pointer; transition: fill-opacity 140ms, opacity 140ms; outline: none; }
.md-shape:hover, .md-shape:focus-visible { fill-opacity: 0.92; stroke: #15354a; stroke-width: 1.6; }
.md-shape.is-dim { opacity: 0.18; pointer-events: none; }
.md-shape.is-selected { fill-opacity: 1; stroke: #0b2c44; stroke-width: 2.4; }
.md-county-label { font: 800 21px 'Nunito Sans', sans-serif; fill: #15354a; paint-order: stroke; stroke: rgb(255 255 255 / 86%); stroke-width: 4px; letter-spacing: 0.02em; pointer-events: none; text-transform: uppercase; }
.md-place { font: 700 13px 'Nunito Sans', sans-serif; fill: #15354a; paint-order: stroke; stroke: rgb(255 255 255 / 90%); stroke-width: 3px; pointer-events: none; }
.md-labels text[hidden], .md-places text[hidden] { display: none; }
.md-tooltip { position: absolute; z-index: 3; max-width: 260px; padding: 7px 12px; border-radius: 10px; background: #15354a; color: #fff; font-size: 12px; font-weight: 700; transform: translate(-50%, -100%); pointer-events: none; white-space: nowrap; }
.md-zoom { position: absolute; left: 14px; bottom: 14px; display: grid; gap: 6px; }
.md-zoom button { width: 40px; height: 40px; border: 1px solid #cfd8de; border-radius: 12px; background: #fff; color: #15354a; font: 700 20px/1 Arial, sans-serif; cursor: pointer; box-shadow: 0 3px 10px rgb(23 62 87 / 16%); }
.md-zoom button:hover { background: #f1f7fb; }
.md-list { margin: 0 28px; padding: 4px 4px 8px; max-height: min(58vh, 560px); overflow: auto; }
.md-group { margin: 0 0 18px; }
.md-group h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 700 16px 'Fira Sans', sans-serif; }
.md-group h4 i, .md-chip i { flex: none; width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.md-items { display: flex; flex-wrap: wrap; gap: 8px; }
.md-item { min-height: 40px; padding: 0 16px; border: 1px solid #cfd8de; border-radius: 999px; background: #fff; color: #15354a; font: 700 13px 'Nunito Sans', sans-serif; cursor: pointer; }
.md-item:hover { border-color: #0071b5; background: #f1f8fc; }
.md-item[aria-current='true'] { border-color: #0071b5; background: #0071b5; color: #fff; }
.md-empty { margin: 16px 0; color: #587083; }
.md-legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 28px 6px; }
.md-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px 0 10px; border: 1px solid #dce1e5; border-radius: 999px; background: #fff; color: #15354a; font: 700 12px 'Nunito Sans', sans-serif; cursor: pointer; }
.md-chip[aria-pressed='true'] { border-color: #15354a; box-shadow: 0 0 0 1px #15354a inset; }
.md-note { margin: 0; padding: 10px 28px 24px; font-size: 12px; line-height: 1.5; color: #587083; }
.map-dialog :is(button, input, select):focus-visible, .md-shape:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
@media (max-width: 760px) {
  .map-dialog { width: calc(100% - 12px); max-height: calc(100dvh - 12px); border-radius: 20px; }
  .md-head, .md-controls, .md-bar, .md-legend, .md-note { padding-left: 16px; padding-right: 16px; }
  .md-map, .md-list { margin-left: 16px; margin-right: 16px; }
  .md-title { font-size: 22px; }
  .md-controls { grid-template-columns: 1fr; gap: 10px; }
  .md-bar { flex-wrap: wrap; }
  .md-svg { height: 46vh; }
}
@media (prefers-reduced-motion: reduce) { .md-shape, .db-map-button { transition: none; } }

/* "Vali kaardilt" sits below the selectors with room to breathe. */
.db-fields { row-gap: 14px; }
.db-fields .db-break { flex: 0 0 100%; height: 0; }
.db-map-button {
  align-self: flex-start;
  min-height: 56px;
  margin: 4px 0 6px;
  padding: 8px 20px 8px 24px;
  gap: 16px;
}
.db-mini-map { width: 60px; min-height: 36px; }
.db-mini-map svg { width: 60px; }
@media (max-width: 760px) {
  .db-fields .db-break { display: none; }
  .db-fields .db-map-button { grid-column: 1 / -1; width: 100%; justify-content: space-between; margin: 6px 0 4px; }
}

/* Zoom buttons: drawn icons, exactly centred. */
.md-zoom button { display: grid; place-items: center; padding: 0; font-size: 0; line-height: 0; }
.md-zoom button svg { display: block; width: 16px; height: 16px; }

/* County select: own chevron in UI blue with comfortable padding (native arrow sat on the edge). */
.md-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 52px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%230071b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 20px center / 16px 16px;
  cursor: pointer;
}
.md-field select:hover { border-color: #a9cbe0; }
.md-field select:focus-visible, .md-field input:focus-visible { border-color: #0071b5; }

/* Close button: drawn cross, exactly centred; zoom buttons keep a square 40px box. */
.md-close { display: grid; place-items: center; padding: 0; font-size: 0; line-height: 0; min-width: 44px; min-height: 44px; }
.md-close svg { display: block; width: 16px; height: 16px; }
.md-zoom button { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }

/* Metrics catalogue: threshold status filter and colour coding */
.metric-status{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 20px}
.metric-status[hidden]{display:none}
.metric-status-btn{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 16px;border:1px solid #cfd8de;border-radius:999px;background:#fff;color:#1c3d52;font:inherit;font-size:14px;cursor:pointer}
.metric-status-btn strong{font-weight:700}
.metric-status-btn .status-dot{width:10px;height:10px;border-radius:50%;background:#8fa3b0}
.metric-status-btn[data-state=unmet] .status-dot{background:#c2410c}
.metric-status-btn[data-state=met] .status-dot{background:#2e7d4f}
.metric-status-btn[data-state=missing] .status-dot{background:#8fa3b0}
.metric-status-btn[data-state=all] .status-dot{background:#006da8}
.metric-status-btn[aria-pressed=true]{background:#eaf5fb;border-color:#006da8;box-shadow:inset 0 0 0 1px #006da8;color:#00507c}
.metric-status-btn:focus-visible{outline:3px solid #006da8;outline-offset:2px}
.official-metric-row{position:relative;padding-left:16px}
.official-metric-row::before{content:"";position:absolute;left:0;top:18px;bottom:0;width:5px;border-radius:3px;background:#d8e1e7}
.official-metric-row[data-state=unmet]::before{background:#c2410c}
.official-metric-row[data-state=met]::before{background:#2e7d4f}
.official-metric-row[data-state=missing]::before{background:#b8c4cc}
.official-metric-row[data-state=unmet]{background:linear-gradient(90deg,#fff5ee,transparent 55%)}
.official-metric-row[data-state=met]{background:linear-gradient(90deg,#f0f8f3,transparent 55%)}
.official-metric-row .official-state.state-0{background:#fde4d3;color:#8a3a0a}
.official-metric-row .official-state.state-1{background:#dcefe3;color:#1f5a3a}

/* Progress timeline */
.progress-timeline{margin:0 0 28px;padding:6px 0 6px 70px;position:relative}
.progress-timeline[hidden]{display:none}
.progress-timeline::before{content:"";position:absolute;left:22px;top:0;bottom:0;width:3px;background:#d5e0e7;border-radius:2px}
.tl-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.tl-item{position:relative;--tl:#a50016}
.tl-item[data-state=done]{--tl:#2e7d4f}
.tl-item[data-state=wait]{--tl:#db8609}
.tl-item[data-state=idle]{--tl:#d6455d}
.tl-item::after{content:"";position:absolute;left:-24px;top:72px;width:24px;height:3px;background:var(--tl)}
.tl-node{position:absolute;left:-70px;top:49px;width:46px;height:46px;z-index:1}
.tl-label{display:block;margin:10px 0 4px;font-size:13px;color:#6b7280}
.tl-card{background:#fff;border-radius:8px;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);border-left:6px solid var(--tl);overflow:hidden}
.tl-ring{fill:#fff;stroke:var(--tl);stroke-width:2.6}
.tl-glyph{fill:none;stroke:var(--tl);stroke-width:3.6;stroke-linecap:round;stroke-linejoin:round}
.tl-glyph-idle path{fill:var(--tl);fill-opacity:.18}
.tl-chev{flex:none;width:32px;height:32px;transition:transform .2s}
.tl-chev .tl-ring{stroke:#8d939c}
.tl-chev .tl-glyph{stroke:#5f6670;stroke-width:3.4}
.is-open .tl-chev{transform:rotate(180deg)}
@media(max-width:560px){.progress-timeline{padding-left:54px}.progress-timeline::before{left:16px}.tl-node{left:-54px;width:38px;height:38px;top:53px}.tl-item::after{left:-16px;width:16px;top:72px}}
@media(prefers-reduced-motion:reduce){.tl-chev{transition:none}}


/* Threshold overview section */
.threshold-section{margin-top:48px}
.threshold-section .th-lead{margin:8px 0 0;max-width:62ch;color:#4b5b68}
.th-filter{margin:20px 0 16px}
.th-search{display:grid;gap:6px;max-width:420px;margin:0 0 20px;font-size:13px;font-weight:700;color:#1b3a52}
.th-search input{min-height:48px;padding:10px 16px;border:1px solid #cfd8de;border-radius:12px;font:inherit;font-weight:400}
.th-search input:focus-visible{outline:3px solid #006da8;outline-offset:2px}
.th-empty{margin:0 0 16px;color:#4b5b68}
.th-empty:empty{display:none}
.th-topics{display:grid;gap:18px}
.th-topic{background:#fff;border:1px solid #d8e1e7;border-radius:14px;overflow:hidden}
.th-topic>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;cursor:pointer;list-style:none;min-height:60px}
.th-topic>summary::-webkit-details-marker{display:none}
.th-topic>summary:focus-visible{outline:3px solid #006da8;outline-offset:-3px}
.th-topic-title{font-weight:700;font-size:18px;color:#1b3a52}
.th-topic-count{font-size:14px;color:#4b5b68;white-space:nowrap}
.th-cell{display:inline-flex;align-items:center;gap:8px;padding:6px 12px 6px 8px;border-radius:999px;font-size:13px;font-weight:700;white-space:nowrap}
.th-glyph{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.th-met{background:#e3f1e8;color:#1f5a3a}
.th-unmet{background:#fdebd0;color:#8a5200}
.th-missing{background:#eef1f4;color:#5f6b76}
.th-none{background:transparent;color:#8b95a0;font-weight:400}
.th-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.th-open,.th-watch{min-height:40px;padding:6px 16px;border-radius:999px;border:1px solid #cfd8de;background:#fff;color:#1b3a52;font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.th-open{color:#006da8}
.th-watch[aria-pressed=true]{background:#eaf5fb;border-color:#82b2ce;color:#00507c}
.th-open:focus-visible,.th-watch:focus-visible{outline:3px solid #006da8;outline-offset:2px}
.th-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media(max-width:820px){
 .th-actions{justify-content:flex-start;padding-top:10px!important}
 .th-topic>summary{flex-wrap:wrap;padding:16px}
}

.th-rail{margin:0;padding:6px 18px 18px 74px}
.th-rail::before{left:44px}
.th-card{padding:16px 18px}
.th-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.th-name{display:block;color:#1b3a52;font-size:17px;line-height:1.4}
.th-service{display:block;margin-top:4px;color:#5f6b76}
.th-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.th-rail .tl-node{left:-52px}
.th-rail .tl-item::after{left:-8px;width:8px}
@media(max-width:560px){.th-rail{padding-left:56px}.th-rail::before{left:28px}.th-card-top{flex-direction:column}.th-rail .tl-node{left:-44px;top:52px}.th-rail .tl-item::after{left:-8px;width:8px}}

/* Threshold section palette: UI blue headings, white chips with coloured border, icon and text */
#thresholds{--th-green:#3d924d;--th-red:#9e4844;--th-orange:#db8609;--th-orange-text:#b45f06;--th-grey:#6b7886}
#thresholds .th-topic-title{color:#006da8}
#thresholds .th-rail .tl-item[data-state=done]{--tl:var(--th-green)}
#thresholds .th-rail .tl-item[data-state=wait]{--tl:var(--th-orange)}
#thresholds .th-rail .tl-item[data-state=idle]{--tl:var(--th-grey)}
#thresholds .tl-label{color:var(--tl);font-weight:700}
#thresholds .th-rail .tl-item[data-state=wait] .tl-label{color:var(--th-orange-text)}
#thresholds .th-cell{background:#fff;border:1.5px solid currentColor}
#thresholds .th-met{color:var(--th-green);background:#fff}
#thresholds .th-unmet{color:var(--th-orange-text);background:#fff;border-color:var(--th-orange)}
#thresholds .th-missing{color:var(--th-grey);background:#fff}
#thresholds .metric-status-btn[data-state=unmet] .status-dot{background:var(--th-orange)}
#thresholds .metric-status-btn[data-state=met] .status-dot{background:var(--th-green)}
#thresholds .metric-status-btn[data-state=missing] .status-dot{background:var(--th-grey)}

/* The old topic accordion is replaced by the iconed threshold overview (#thresholds). */
.insight-catalogue{display:none!important}

/* Hourglass: caps, sand and drops are solid shapes; the glass is a line. */
.tl-glyph-wait path{stroke-width:2.2}
.tl-fill{fill:currentColor;stroke:none!important}
.tl-glyph-wait .tl-fill{fill:var(--tl)}
.th-unmet .th-glyph{stroke-width:1.5}
.th-unmet .th-glyph .tl-fill{fill:currentColor}

/* Expandable area overview under the decision bar */
.area-overview{margin:-8px 0 28px;background:#fff;border:1px solid #d8e1e7;border-radius:18px;box-shadow:0 6px 24px rgba(20,60,90,.06)}
.area-overview[hidden]{display:none}
.ao-head{display:flex;align-items:center;gap:16px;width:100%;min-height:76px;padding:16px 24px;border:0;background:transparent;font:inherit;text-align:left;cursor:pointer;color:#1b3a52;border-radius:18px;box-shadow:none;transform:none}
.ao-head:hover{background:#f7fafc;transform:none}
.ao-head:focus-visible{outline:3px solid #006da8;outline-offset:-3px}
.ao-titles{display:grid;gap:2px;margin-right:auto}
.ao-title{font-size:20px;line-height:1.3}
.ao-place{color:#5f6b76;font-size:14px}
.ao-average{position:relative;flex:none;width:56px;height:56px;display:grid;place-items:center}
.ao-ring{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.ao-track{fill:#fff;stroke:#e3e8ec;stroke-width:5}
.ao-arc{fill:none;stroke-width:5;stroke-linecap:round;transition:stroke-dashoffset .5s}
.ao-ring-value{position:relative;font-size:15px;color:#1b3a52;font-variant-numeric:tabular-nums}
.ao-ring-label{color:#5f6b76;font-size:13px}
.ao-head:hover .ao-ring{filter:none}
.ao-head:hover .ao-track{stroke:#e3e8ec}
.ao-head:hover .ao-average,.ao-head:focus-visible .ao-average{box-shadow:none}
.area-overview .tl-chev{flex:none;width:36px;height:36px;transition:transform .2s}
.area-overview .tl-chev .tl-ring{fill:#fff;stroke:#b9c3cb;stroke-width:.9}
.area-overview .tl-chev .tl-glyph{fill:none;stroke:#006da8;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round}
.area-overview.is-open .tl-chev{transform:rotate(180deg)}
.ao-body{padding:4px 24px 24px}
#municipality-workspace .decision-bar a.ao-source{position:absolute;top:14px;right:20px;display:inline-flex;align-items:center;gap:.35em;min-height:40px;padding:6px 16px;border:1px solid #006da8;border-radius:999px;background:#fff;color:#006da8;font-size:15px;font-weight:700;text-decoration:none;transition:background-color .15s,color .15s}
#municipality-workspace .decision-bar a.ao-source .ao-source-kind{color:#4e697a;font-weight:400}
#municipality-workspace .decision-bar a.ao-source .ao-source-arrow{display:inline-grid;place-items:center;flex:none;width:28px;height:28px;margin:0 -8px 0 6px;border:1px solid #b8c7d1;border-radius:50%;color:#4e697a}
#municipality-workspace .decision-bar a.ao-source .ao-source-arrow svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#municipality-workspace .decision-bar a.ao-source:is(:hover,:focus-visible){background:#006da8;color:#fff}
#municipality-workspace .decision-bar a.ao-source:active{border-color:#00527e;background:#00527e;color:#fff}
#municipality-workspace .decision-bar a.ao-source:is(:hover,:focus-visible,:active) .ao-source-kind{color:#dfe7ed}
#municipality-workspace .decision-bar a.ao-source:is(:hover,:focus-visible,:active) .ao-source-arrow{border-color:#fff;color:#fff}
/* Phones: a quiet link under the main action, so the top of the box stays calm. */
@media(max-width:560px){
#municipality-workspace .decision-bar a.ao-source{position:static;grid-column:1/-1;justify-self:center;min-height:40px;margin-top:2px;padding:4px 8px;border:0;background:none;font-size:14px}
#municipality-workspace .decision-bar a.ao-source:is(:hover,:focus-visible){border-radius:999px;background:#006da8}
#municipality-workspace .decision-bar a.ao-source .ao-source-arrow{width:24px;height:24px;margin:0 0 0 4px}
#municipality-workspace .decision-bar a.ao-source .ao-source-arrow svg{width:12px;height:12px}
}
/* Wide screens: the main action shares the row of the stat cards, at their right end and centre. */
@media(min-width:901px){#municipality-workspace .decision-bar .db-next{grid-area:stats;align-self:center;justify-self:end;width:max-content;margin:0;white-space:nowrap}}
#municipality-workspace .ao-note.toolbox-source-note{margin:0 0 20px;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
#municipality-workspace .ao-note.toolbox-source-note a{font-weight:400}
.ao-note{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 20px}
.ao-note-text{margin:0;color:#4e697a;font-size:15px;line-height:1.45}
.ao-note-status{display:none}
.ao-note .info-dot{width:24px;height:24px;margin:0;background:#6f7b85;box-shadow:none;font-size:16px!important}
.ao-note .info-dot:hover,.ao-note .info-dot[aria-expanded='true']{background:#56616a}
.area-overview .ao-grid.insight-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:0}
@media(max-width:820px){.area-overview .ao-grid.insight-grid{grid-template-columns:1fr}.ao-head{flex-wrap:wrap;padding:14px 16px;gap:10px}.ao-average{order:3}.ao-ring-label{display:none}.ao-body{padding:4px 14px 18px}}
@media(prefers-reduced-motion:reduce){.area-overview .tl-chev,.ao-arc{transition:none}}

/* Section arrows: grey while closed, UI blue while open. */
#municipality-workspace details > summary::after,
#detail details > summary::after{background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'><circle cx='18' cy='18' r='17' fill='white' stroke='%23b8c7d1' stroke-width='1.5'/><path d='M18 10v16m-6-6 6 6 6-6' fill='none' stroke='%238a97a3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>")}
#municipality-workspace details > summary:hover::after,
#detail details > summary:hover::after,
#municipality-workspace details > summary:focus-visible::after,
#detail details > summary:focus-visible::after{background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'><circle cx='18' cy='18' r='17' fill='white' stroke='%230878bd' stroke-width='1.5'/><path d='M18 10v16m-6-6 6 6 6-6' fill='none' stroke='%238a97a3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>")}
#municipality-workspace details[open] > summary::after,
#detail details[open] > summary::after{background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'><circle cx='18' cy='18' r='17' fill='white' stroke='%23b8c7d1' stroke-width='1.5'/><path d='M18 10v16m-6-6 6 6 6-6' fill='none' stroke='%23006da8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>")}
#municipality-workspace details[open] > summary:hover::after,
#detail details[open] > summary:hover::after,
#municipality-workspace details[open] > summary:focus-visible::after,
#detail details[open] > summary:focus-visible::after{background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'><circle cx='18' cy='18' r='17' fill='white' stroke='%230878bd' stroke-width='1.5'/><path d='M18 10v16m-6-6 6 6 6-6' fill='none' stroke='%23006da8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>")}

/* Rail in the threshold lists: stops short of the box edges and ends in small grey dots. */
#thresholds .th-rail::before{
  left:41px;top:12px;bottom:14px;width:9px;border-radius:0;
  background:
    radial-gradient(circle at 50% 4.5px,#d5e0e7 0 4.5px,transparent 4.8px) top/9px 9px no-repeat,
    radial-gradient(circle at 50% calc(100% - 4.5px),#d5e0e7 0 4.5px,transparent 4.8px) bottom/9px 9px no-repeat,
    linear-gradient(#d5e0e7,#d5e0e7) center/3px 100% no-repeat;
}
@media(max-width:560px){#thresholds .th-rail::before{left:25px}}

/* Print: only the plan prints; the page-level bar, overview panel and map dialog stay off paper. */
@media print{
  .decision-bar,.area-overview,.progress-timeline,#thresholds,.map-dialog,dialog[open].map-dialog{display:none!important}
  /* Workbench chrome: the id-based rules above would otherwise beat the plain print rules of the workbench stylesheet. */
  #municipality-workspace .wb-primary,#municipality-workspace .wb-secondary,#municipality-workspace .wb-decision,
  #municipality-workspace .wb-next,#municipality-workspace .wb-context,#municipality-workspace .wb-breadcrumb,
  #municipality-workspace .wb-export-actions,#municipality-workspace .wb-guide,#municipality-workspace .wb-top,#municipality-workspace .wb-head{display:none!important}
}

/* Practice map: roomier frame, folding side list, note box */
.practice-map.panel{padding:32px 32px 36px}
.practice-map .map-heading{margin-bottom:28px;align-items:center}
.practice-map .map-workspace{gap:32px;align-items:start}
.practice-map .map-workspace.mc-collapsed{grid-template-columns:minmax(0,1fr)}
.practice-map .map-note-source{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:0}
.practice-map .map-heading>.map-note-slot{position:relative;margin-left:auto;margin-right:12px;flex:0 0 auto;width:auto}
.map-note-button{position:static}
.map-note{position:absolute;z-index:5;top:calc(100% + 10px);right:-8px;width:min(340px,calc(100vw - 72px));padding:16px 18px;background:#fff;border:1px solid #cfd8de;border-radius:14px;box-shadow:0 12px 32px rgba(20,60,90,.18);font-size:14px;line-height:1.55;color:#33495a}
.map-note[hidden]{display:none}
.practice-map .map-context{padding:0}
.mc-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px}
.mc-head #place-title{margin:0}
.mc-toggle{flex:none;width:44px;height:44px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;display:grid;place-items:center;box-shadow:none;min-height:44px}
.mc-toggle .tl-chev{width:36px;height:36px;transition:transform .2s}
.mc-toggle .tl-chev .tl-ring{fill:#fff;stroke:#b9c3cb;stroke-width:.9}
.mc-toggle .tl-chev .tl-glyph{fill:none;stroke:#8a97a3;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round}
.mc-toggle[aria-expanded=true] .tl-chev{transform:rotate(180deg)}
.mc-toggle[aria-expanded=true] .tl-chev .tl-glyph{stroke:#006da8}
.mc-toggle:focus-visible{outline:3px solid #ffbf47;outline-offset:2px}
.mc-body{padding:0 24px 24px}
.map-context.is-collapsed{padding:0}
@media(max-width:600px){.practice-map.panel{padding:20px 16px 24px}.mc-head{padding:16px}.mc-body{padding:0 16px 18px}.map-note-slot{margin-right:8px}}
@media(prefers-reduced-motion:reduce){.mc-toggle .tl-chev{transition:none}}
.practice-map .map-context{display:block}
@media(max-width:1100px){.mc-body #place-list{max-height:none}}
@media(max-width:600px){
  .practice-map .map-heading{display:flex!important;flex-direction:row!important;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:12px 10px}
  .practice-map .map-heading>div:first-child{flex:1 1 100%}
  .practice-map .map-heading>.map-note-slot{flex:0 0 auto;width:auto;margin:0}
  .map-note{left:0;right:auto}
}

/* Google Maps controls keep Google's own look: the page's link ring, arrow and 44px button rules do not apply inside the map. */
#municipality-workspace #practice-live-map a.toolbox-circle-link.toolbox-circle-link{
  display:inline;min-height:0;padding:0;margin:0;gap:0;border:0;border-radius:0;background:transparent;box-shadow:none;
  color:inherit;font:inherit;text-decoration:none;max-width:none;transform:none;
}
#municipality-workspace #practice-live-map .toolbox-link-arrow{display:none!important}
#municipality-workspace #practice-live-map .gm-style-cc button,
#municipality-workspace #practice-live-map .gm-style-cc a{
  min-height:0!important;min-width:0!important;padding:0!important;border-radius:0!important;box-shadow:none!important;
  background:transparent!important;transform:none!important;border:0!important;
}

/* Empty states: dashed grey boxes preview what each board fills in once a municipality is chosen. */
.wb-ghost,.th-ghost{display:grid;gap:14px;margin:18px 0}
.wb-ghost-row,.th-ghost-row{display:flex;align-items:center;gap:16px}
.wb-ghost-dot,.th-ghost-dot{flex:none;width:44px;height:44px;border:2px dashed #b9c6d0;border-radius:50%;box-sizing:border-box}
.wb-ghost-bar,.th-ghost-bar{display:block;height:12px;border-radius:6px;background:#e5ebf0;margin:8px 0}
.wb-ghost-bar.short,.th-ghost-bar.short{width:55%}
.wb-ghost-row>div,.th-ghost-card{flex:1;border:2px dashed #cfd8de;border-radius:14px;padding:12px 18px;background:#fafcfd}
.th-ghost-label{display:block;font-size:13px;font-weight:700;color:#8a97a3}
.wb-ghost.cards{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.wb-ghost-card{border:2px dashed #cfd8de;border-radius:14px;padding:18px;background:#fafcfd}
.wb-skel-cell{color:#8a97a3;border:2px dashed #d5dde3!important;background:#fafcfd;text-align:center}
.wb-skel-figure{display:block;font-size:28px;color:#9aa7b2;border:2px dashed #cfd8de;border-radius:14px;padding:18px 22px;margin:0 0 12px;background:#fafcfd}
#plan-items>p.empty{border:2px dashed #cfd8de;border-radius:14px;padding:28px 24px;background:#fafcfd;color:#4b5b68;text-align:center;margin:0}
.wb-guide{display:grid;gap:10px;margin:14px 0 4px;padding:0}
.wb-guide>div{display:grid;grid-template-columns:130px 1fr;gap:6px 16px;align-items:baseline}
.wb-guide dt{font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#5f6b76}
.wb-guide dd{margin:0;color:#33495a;font-size:15px;line-height:1.5}
@media(max-width:600px){.wb-guide>div{grid-template-columns:1fr}.wb-ghost-dot,.th-ghost-dot{width:34px;height:34px}}
.wb-delta.up{color:#2f7a3d;font-weight:700}
.wb-delta.down{color:#b45f06;font-weight:700}

/* Indicator cards: title, status chips, then the actions. Wide: actions beside the title. Narrow: both buttons side by side at full width under the chips. */
#thresholds .th-card{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"text actions" "chips chips";gap:12px 20px;align-items:start}
#thresholds .th-card-top{display:contents}
#thresholds .th-card-top>div:first-child{grid-area:text;min-width:0}
#thresholds .th-card .th-actions{grid-area:actions;display:flex;flex-wrap:nowrap;gap:8px;justify-content:flex-end;padding-top:0!important}
#thresholds .th-card .th-chips{grid-area:chips;margin-top:0}
#thresholds .th-open,#thresholds .th-watch{white-space:nowrap;min-height:44px;padding:8px 18px;display:inline-flex;align-items:center;justify-content:center}
#thresholds .th-watch{order:-1}
#thresholds .th-watch:not([aria-pressed=true]){background:#006da8;border-color:#006da8;color:#fff}
#thresholds .th-open{background:#fff;color:#006da8;border-color:#82b2ce}
@media(max-width:900px){
  #thresholds .th-card{grid-template-columns:minmax(0,1fr);grid-template-areas:"text" "chips" "actions"}
  /* The buttons share a row when there is room and otherwise wrap onto their own rows, always at full row width. */
  #thresholds .th-card .th-actions{display:flex;flex-wrap:wrap;justify-content:stretch;margin-top:2px}
  #thresholds .th-watch{flex:1 1 160px}
  #thresholds .th-open{flex:1 1 90px}
}

/* Narrow screens: the two tabs stack, so the outer frame gets the matching rounded shape (button radius + inner gap)
   instead of a full pill, which kept the stacked buttons off its curve. */
@media (max-width: 560px) {
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 34px;
    padding: 8px;
    gap: 6px;
  }
  body.liigume-toolbox-page #municipality-workspace > .layout > aside nav a {
    border-radius: 26px;
    min-height: 52px;
    border-left: 0;
  }
}

/* QC: contrast and target size. Green text needs a darker shade (#2f7a3d, 5.3:1) than the #3d924d used for borders and icons. */
#thresholds .th-met{color:#2f7a3d;border-color:#3d924d}
#thresholds .th-rail .tl-item[data-state=done] .tl-label{color:#2f7a3d}
.toolbox-site-footer a,.toolbox-site-contacts>span:not(:first-child){color:#006da8}
.toolbox-site-contacts a,.toolbox-site-brand{display:inline-flex;align-items:center;min-height:24px}
#municipality-workspace .wb-body .wb-breadcrumb a.toolbox-circle-link{display:inline-flex!important;align-items:center;min-height:24px!important}

/* One simple check mark everywhere: a rounded two-stroke tick drawn as a mask, so it takes the text colour. */
.is-checked::after,.plan-progress.is-check::before,.ff-dot.is-done::before{
  content:"";display:inline-block;width:1.05em;height:1.05em;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13l4.2 4.2L19.5 6.8' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13l4.2 4.2L19.5 6.8' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.is-checked::after{margin-left:6px;vertical-align:-.15em}
.plan-progress.is-check::before{margin-right:6px;vertical-align:-.15em}

/* Data note overlay opened by the "i" button. */
.info-pop{position:fixed;z-index:70;box-sizing:border-box;padding:16px 18px;border:1.5px solid #cfd8de;border-radius:16px;background:#fff;color:#1b3a52;box-shadow:0 14px 34px rgb(15 40 65 / 20%);font-size:15px;line-height:1.55}
.info-pop[hidden]{display:none}
.info-pop strong{display:block;margin-bottom:4px;font-size:16px;color:#006da8}
.info-pop p{margin:0}
@media print{.info-pop{display:none!important}}

/* Municipality picker inside the Töölaud. */
.wb-pick{display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;margin:4px 16px 18px;padding:16px 22px;border:1.5px solid #cfd8de;border-radius:18px;background:#fff;color:#1b3a52}
.wb-pick label{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font-weight:700}
.wb-pick select{min-height:44px;min-width:220px;max-width:100%;padding:8px 12px;border:1.5px solid #9fb2bf;border-radius:12px;background:#fff;color:#1b3a52;font:inherit;font-weight:600}
.wb-pick-hint{margin:0;font-size:14px;line-height:1.5;color:#46606f;flex:1 1 240px}
.wb-pick.is-empty{border-style:dashed;border-color:#3d924d;background:#f3faf4}
.wb-pick.is-empty select{border-color:#2f7a3d}
@media print{.wb-pick{display:none!important}}

/* Decision bar: more room between its content and the rounded border. */
.decision-bar { padding: 24px 26px; gap: 16px 22px; }
@media (max-width: 560px) { .decision-bar { padding: 22px 20px; gap: 14px; } }

/* Real switch between the two parts of the page. */
#municipality-workspace[data-view='actions'] #desktop,
#municipality-workspace[data-view='actions'] #indicators { display: none; }
#municipality-workspace[data-view='desktop'] #actions { display: none; }

/* Indicator card buttons: the colour tone changes on hover and press. */
#thresholds .th-open,#thresholds .th-watch{transition:background-color .18s,border-color .18s,color .18s}
@media (hover:hover){
  #thresholds .th-watch:not([aria-pressed=true]):hover{background:#00507c;border-color:#00507c;color:#fff;box-shadow:none;transform:none}
  #thresholds .th-open:hover{background:#eaf5fb;border-color:#006da8;color:#00507c;box-shadow:none;transform:none}
  #thresholds .th-watch[aria-pressed=true]:hover{background:#d3e9f5;border-color:#006da8;color:#00507c;box-shadow:none;transform:none}
}
#thresholds .th-watch:not([aria-pressed=true]):active{background:#003d60;border-color:#003d60;color:#fff}
#thresholds .th-open:active{background:#d3e9f5;border-color:#00507c}
#thresholds .th-watch[aria-pressed=true]:active{background:#bfdcec}


.th-topic-count em.th-sep{font-style:normal;font-weight:400;white-space:pre}

/* Close buttons whose "×" is a text glyph: draw the X with two bars so it is exactly centred in the button. */
#detail > .close, .toolbox-site-search-close, .year-info-close {
  position: relative; font-size: 0 !important; line-height: 0 !important;
}
#detail > .close::before, #detail > .close::after,
.toolbox-site-search-close::before, .toolbox-site-search-close::after,
.year-info-close::before, .year-info-close::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: max(12px, 42%); height: 2.5px; border-radius: 2px;
  background: currentColor; transform: translate(-50%, -50%) rotate(45deg);
}
#detail > .close::after, .toolbox-site-search-close::after, .year-info-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* Chevrons for the sideways-scrolling board steps. */
.wb-chev{position:absolute;top:50%;z-index:3;display:grid;place-items:center;width:40px;height:40px;margin-top:-20px;padding:0;border:2px solid #9aa7b1;border-radius:50%;background:transparent;color:#006da8;cursor:pointer;box-shadow:none;transition:background-color .18s,border-color .18s}
.wb-chev{box-sizing:border-box;width:40px;height:40px;min-width:40px;min-height:40px;aspect-ratio:1}
.wb-chev[hidden]{display:none}
.wb-chev-left{left:8px}.wb-chev-right{right:8px}
.wb-chev svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.wb-chev:hover{background:rgb(255 255 255 / 45%);border-color:#006da8;color:#00507c}
.wb-chev:focus-visible{outline:3px solid #ffbf47;outline-offset:2px}
@media(min-width:901px){.wb-chev{display:none!important}}
@media(print){.wb-chev{display:none!important}}

/* Every "i" information glyph uses the same italic Georgia "i" as the notice boxes. */
.info-dot,
.explanation-icon,
.year-info > span,
.lb-i {
  font-family: Georgia, 'Times New Roman', serif !important;
  font-style: italic !important;
  font-weight: 700 !important;
}
.info-dot { font-size: 19px !important; }
.year-info > span, .explanation-icon { font-size: 15px !important; }

/* Breathing room around the numbers in the status cards. */
.db-stats li a strong { display: block; margin-top: 8px; padding: 0 4px 6px; }
