@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url(vendor/fonts/fira-sans-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url(vendor/fonts/fira-sans-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-weight: 500; font-display: swap; src: url(vendor/fonts/fira-sans-500-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-weight: 500; font-display: swap; src: url(vendor/fonts/fira-sans-500-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Zarges brand (spec §7); score scale runs pale tint -> deep navy */
  --blue: #00AEEF;
  --ink: #4A4A4A;
  --ink-strong: #1F2A36;
  --muted: #6B6B6B;
  --line: #E2E2E2;
  --line-soft: #EFEDED;
  --bg: #FFFFFF;
  --bg-soft: #F6F7F8;
  --v1: #D3F1FC; --v2: #7FD4F6; --v3: #00AEEF; --v4: #0A6DAA; --v5: #0B2D5B;
  --vx: #E4E4E4;
  --navy: #0B2D5B;
  --focus: #0A6DAA;
  --primary: #1D1F20;
  --control: #D1D5DB;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 14px/1.45 "Fira Sans", Arial, sans-serif;
  display: grid; grid-template-rows: auto auto 1fr; grid-template-columns: minmax(0, 1fr); height: 100dvh; overflow: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--ink-strong); }
a { color: var(--v4); text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.tag {
  display: inline-block; font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 3px;
  border: 1px solid var(--line); color: var(--muted); font-weight: 400; vertical-align: 1px; letter-spacing: .01em;
}

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; gap: 20px; padding: 12px 20px; border-bottom: 1px solid var(--line);
}
.logo { height: 22px; width: auto; display: block; }
.top h1 { font-size: 17px; letter-spacing: .005em; }
.badge {
  font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 3px;
  background: #FFF4DB; color: #6B4A00; border: 1px solid #F0D9A0; white-space: nowrap;
}
.credit { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- toolbar ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 10px 20px;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.field { display: flex; align-items: center; gap: 8px; }
.field-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.seg button {
  border: 0; background: var(--bg); padding: 6px 14px; cursor: pointer; border-left: 1px solid var(--line); white-space: nowrap;
}
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--bg-soft); }
.seg button[aria-pressed="true"] { background: #E9E9E9; color: var(--ink-strong); font-weight: 500; }
.seg-sm button { padding: 4px 10px; font-size: 13px; min-width: 32px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.check input { accent-color: var(--primary); width: 15px; height: 15px; margin: 0; }
.btn {
  border: 0; background: var(--primary); color: #fff; border-radius: 4px; margin-left: auto;
  padding: 7px 14px; cursor: pointer; font-weight: 500; white-space: nowrap;
}
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn-quiet { display: none; border: 1px solid var(--control); background: var(--bg); border-radius: 4px; padding: 5px 12px; cursor: pointer; }
.btn-list { display: inline-block; margin-left: auto; }
.btn-list[aria-expanded="true"] { background: #E9E9E9; border-color: #E9E9E9; color: var(--ink-strong); font-weight: 500; }
.btn-list + .btn { margin-left: 0; }
.btn-link { border: 0; background: none; padding: 0; color: var(--v4); cursor: pointer; text-align: left; }
.btn-link:hover { text-decoration: underline; }

/* ---------- layout ---------- */
main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 0; min-width: 0; overflow: hidden; }
/* desktop: the open panel takes its own column, so map and list shrink instead of sliding under it */
@media (min-width: 1100px) {
  main:has(> .panel:not([hidden])) { grid-template-columns: minmax(0, 1fr) clamp(360px, 34vw, 480px); }
  main > .panel { position: static; width: auto; box-shadow: none; }
  main:has(> .panel:not([hidden])) .col-opt { display: none; }
  main:has(> .panel:not([hidden])) .companies td.name { min-width: 150px; }
}
.note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
/* the map owns the first screen; the list is a drawer under it */
.work { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 0; min-width: 0; }
.work.list-open { grid-template-rows: minmax(0, 1fr) minmax(220px, 42%); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#map { min-height: 0; background: #EDEDED; }
.leaflet-tile-pane { filter: grayscale(1) contrast(.9); }
.leaflet-container { font: inherit; }
.leaflet-bar a.leaflet-control-zoom-in, .leaflet-bar a.leaflet-control-zoom-out { font: 400 20px/30px "Fira Sans", Arial, sans-serif; color: var(--ink-strong); }
.leaflet-control-attribution { font-size: 11px; padding: 1px 16px 1px 6px !important; }

/* ---------- pins ---------- */
.pin {
  display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%;
  font-size: 11px; font-weight: 500; line-height: 1; color: var(--navy);
  border: 1.5px solid var(--navy); outline: 1.5px solid #fff; cursor: pointer;
}
.pin.v1 { background: var(--v1); }
.pin.v2 { background: var(--v2); }
.pin.v3 { background: var(--v3); }
.pin.v4 { background: var(--v4); color: #fff; }
.pin.v5 { background: var(--v5); color: #fff; }
.pin.vx { background: var(--vx); color: var(--ink); border-color: #8A8A8A; }
.pin.vl { background: #fff; border-color: var(--ink); cursor: default; }
.s0 { width: 16px; height: 16px; } .s1 { width: 18px; height: 18px; } .s2 { width: 21px; height: 21px; }
.s3 { width: 24px; height: 24px; } .s4 { width: 27px; height: 27px; font-size: 12px; } .s5 { width: 31px; height: 31px; font-size: 12px; }
.s6 { width: 36px; height: 36px; font-size: 13px; }
.su { width: 24px; height: 24px; border-style: dashed; }
.sv { width: 24px; height: 24px; }
.leaflet-marker-icon.pin:hover, .leaflet-marker-icon.pin.hl { outline: 2.5px solid var(--navy); outline-offset: 2px; z-index: 1000 !important; }
.leaflet-marker-icon.pin.sel { outline: 3px solid var(--ink-strong); outline-offset: 3px; z-index: 1001 !important; }

.cluster {
  border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1.5px solid var(--navy); outline: 3px solid rgba(255,255,255,.85); color: var(--navy); line-height: 1;
}
.cluster b { font-size: 14px; font-weight: 500; }
.cluster.v1 { background: var(--v1); } .cluster.v2 { background: var(--v2); } .cluster.v3 { background: var(--v3); }
.cluster.v4 { background: var(--v4); color: #fff; } .cluster.v5 { background: var(--v5); color: #fff; }
.cluster.vx { background: var(--vx); }
.cluster.hl { outline: 2.5px solid var(--navy); outline-offset: 2px; }

/* ---------- legend ---------- */
/* overlays on the map: legend bottom left, regions top right, both collapsible */
.ov { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 0 12px 10px; width: 272px;
  max-height: calc(var(--map-h, 600px) - 24px); overflow: auto; font-size: 13px; color: var(--ink); }
.ov:not([open]) { padding-bottom: 0; width: auto; }
.ov-regions { width: 316px; }
.ov summary { margin: 0 -12px; padding: 8px 12px; font-weight: 500; color: var(--ink-strong); cursor: pointer; white-space: nowrap; }
.ov[open] summary { border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.ov h3 { font-size: 12px; color: var(--muted); font-weight: 400; margin: 10px 0 6px; }
.leaflet-container .ov a { color: var(--v4); }
.lg-cluster { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.lg-cluster .cluster { width: 26px; height: 26px; flex: none; outline: 0; }
.lg-cluster .cluster b { font-size: 12px; }
.lg-scale { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.lg-scale li.gap { margin-left: 10px; }
.lg-ends { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.lg-size { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.lg-size li { display: grid; grid-template-columns: 40px 1fr; align-items: center; font-size: 12px; min-height: 34px; }
.lg-size .pin { justify-self: center; }
.lg-size li:last-child { grid-column: 1 / -1; }
.lg-scale .pin, .lg-size .pin { cursor: default; }
.lg-abc { display: grid; grid-template-columns: 20px 1fr; gap: 4px 10px; margin: 0; font-size: 13px; }
.lg-abc dt { font-weight: 500; color: var(--ink-strong); }
.lg-abc dd { margin: 0; }

/* ---------- regions ---------- */
.regions { width: 100%; border-collapse: collapse; font-size: 13px; }
.regions th, .regions td { padding: 3px 4px; text-align: right; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.regions thead th { font-size: 11px; font-weight: 400; color: var(--muted); }
.regions th[scope="row"], .regions thead th:first-child { text-align: left; white-space: nowrap; }
.regions th[scope="row"] .btn-link { font-weight: 500; }
.regions small { display: inline-block; max-width: 110px; margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; font-size: 11px; color: var(--muted); font-weight: 400; }
.regions .cur { color: var(--ink-strong); font-weight: 500; background: var(--bg-soft); }

/* ---------- list ---------- */
.list { display: none; flex-direction: column; min-height: 0; border-top: 1px solid var(--line); }
.list-head { display: flex; align-items: center; gap: 16px; padding: 8px 20px; } /* close link stays left, clear of the panel */
.list-head h2 { font-size: 14px; }
.table-wrap { overflow: auto; min-height: 0; flex: 1; }
.companies { width: 100%; border-collapse: collapse; font-size: 13px; }
.companies th, .companies td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.companies th:first-child, .companies td:first-child { padding-left: 20px; }
.companies thead th { position: sticky; top: 0; background: var(--bg); z-index: 1; border-bottom: 1px solid var(--line); font-weight: 400; white-space: nowrap; }
.companies thead button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.companies thead th[aria-sort] button { color: var(--ink-strong); font-weight: 500; }
.companies .arrow { font-size: 11px; min-width: 8px; }
.companies tbody tr { cursor: pointer; }
.companies tbody tr:hover, .companies tbody tr:focus-visible { background: var(--bg-soft); }
.companies tbody tr:focus-visible { outline-offset: -2px; }
.companies tbody tr.sel { background: #EAF6FC; }
.companies td.name { color: var(--ink-strong); font-weight: 500; min-width: 180px; }
.companies td { white-space: nowrap; }
.companies td.name, .companies td.cat { white-space: normal; }
.companies .num { font-variant-numeric: tabular-nums; }
.companies .r { text-align: right; }
.companies th.r button .arrow { order: -1; }
.companies thead .tag { display: block; margin-top: 2px; }
.companies thead button:has(.tag) { flex-direction: column; align-items: flex-end; gap: 0; }
.companies .cur { background: rgba(0, 0, 0, .02); }
.companies thead th.cur { background: #F9F9F9; } /* opaque: rows scroll under the sticky header */
.vc { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--navy); flex: none; }
.dot.v1 { background: var(--v1); } .dot.v2 { background: var(--v2); } .dot.v3 { background: var(--v3); }
.dot.v4 { background: var(--v4); } .dot.v5 { background: var(--v5); } .dot.vx { background: var(--vx); border-color: #8A8A8A; }

/* ---------- panel ---------- */
.panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); z-index: 1100;
  background: var(--bg); border-left: 1px solid var(--line); overflow: auto; outline: none;
  box-shadow: -8px 0 24px rgba(31, 42, 54, .08); /* taste-skill-ignore: the panel floats over the map */
}
.panel[hidden] { display: none; }
.p-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); position: relative; }
.p-head h2 { font-size: 19px; line-height: 1.25; padding-right: 36px; outline: none; }
.addr { margin: 6px 0 2px; }
.close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; background: none;
  font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); border-radius: 4px;
}
.close:hover { background: var(--bg-soft); color: var(--ink-strong); }
.facts { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 14px 0 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts small { display: block; color: var(--muted); font-size: 12px; }
.cell { font-size: 14px; font-weight: 500; color: var(--ink-strong); }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.chip {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--bg); cursor: pointer; text-align: left; font-size: 13px; line-height: 1.2;
}
.chip small { display: block; font-size: 12px; color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--ink-strong); background: #F2F2F2; }
.chip:hover { background: var(--bg-soft); }
.overall { padding: 16px 24px 4px; }
.overall h3 { font-size: 13px; color: var(--muted); font-weight: 400; }
.overall .verdict { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 500; color: var(--ink-strong); }
.overall p { margin: 8px 0; }
.dims { list-style: none; margin: 0; padding: 0 24px 32px; }
.dims li { padding: 16px 0; border-top: 1px solid var(--line-soft); }
.dims li:first-child { border-top: 1px solid var(--line); }
.dim-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dim-head h4 { font-size: 14px; }
.dims p { margin: 6px 0; }
.rating { white-space: nowrap; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.rating.ok { color: var(--v4); font-weight: 500; }
.rating.no { color: var(--muted); }
.tick { width: 9px; height: 5px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--navy); }
.dots i.on { background: var(--navy); }
blockquote {
  margin: 10px 0 6px; padding: 2px 0 2px 14px; border-left: 2px solid var(--blue);
  color: var(--ink-strong); white-space: pre-line; overflow-wrap: anywhere;
}
blockquote::before { content: "„"; }
blockquote::after { content: "“"; }
blockquote.no-open::before, blockquote.no-close::after { content: none; } /* the quote brings its own mark */
.seen-label { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.seen blockquote { margin-top: 4px; border-left-color: #C9C9C9; color: var(--muted); }
.seen .src, .seen .src span { color: var(--muted); }
.src { font-size: 12px; overflow-wrap: anywhere; display: inline-block; margin-top: 2px; }
.src span { color: var(--muted); }

.work.list-open .list { display: flex; }

/* ---------- tablet & phone: the list replaces the map ---------- */
@media (max-width: 1099px) {
  .top { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .top h1 { font-size: 15px; }
  .toolbar { padding: 8px 16px; gap: 10px 16px; }
  .work.list-open { grid-template-rows: minmax(0, 1fr); }
  .work.list-open #map { display: none; }
  .companies th:first-child, .companies td:first-child { padding-left: 16px; }
  .ov { max-width: calc(100vw - 80px); }
}
@media (max-width: 600px) {
  .credit { display: none; }
  .btn-quiet { display: inline-block; }
  .toolbar .opt { display: none; }
  .toolbar.show-opt .opt { display: flex; flex-basis: 100%; }
  .panel { width: 100%; }
}
