/* „Apa de la robinet”: /utile/apa-de-la-robinet (views/utile/apa-de-la-robinet.ejs) și paginile pe orașe (views/apa-robinet/oras.ejs).
   Instrumentul: views/partials/apa-robinet-tool.ejs, public/js/apa-robinet.js. Doar clase .ar-*. */
.ar {
  --ar-ink: #083344;
  --ar-deep: #0e7490;
  --ar-deep-700: #155e75;
  --ar-soft: #ecfeff;
  --ar-line: #cfe8ef;
  --ar-moale: #e0f2fe;
  --ar-medie: #bae6fd;
  --ar-dura: #7dd3fc;
  --ar-fill-moale: #38bdf8;
  --ar-fill-medie: #0284c7;
  --ar-fill-dura: #0c4a6e;
}

/* antetul: deschis la culoare, cu orașele direct în el */
.ar-top { background: linear-gradient(160deg, #ecfeff 0%, #f0f9ff 55%, #ffffff 100%); border-bottom: 1px solid var(--ar-line); padding: 18px 0 30px; }
.ar-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 18px; padding: 0; list-style: none; font-size: .82rem; color: var(--ut-muted); }
.ar-crumbs li + li::before { content: '/'; margin-right: 8px; color: #94a3b8; }
.ar-crumbs a { color: var(--ar-deep-700); text-decoration: none; font-weight: 600; }
.ar-top__grid { display: grid; gap: 22px; align-items: start; }
.ar-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--ar-line); color: var(--ar-deep-700); font-size: .78rem; font-weight: 700; }
.ar-chip .ut-icon { width: 15px; height: 15px; }
.ar-h1 { margin: 0 0 12px; font-size: clamp(1.7rem, 4.2vw, 2.6rem); line-height: 1.12; font-weight: 850; letter-spacing: -.02em; color: var(--ar-ink); }
.ar-lead { margin: 0; max-width: 62ch; color: var(--ut-text); font-size: 1.04rem; line-height: 1.6; }
.ar-top__cities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.ar-top__cities a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--ar-line); color: var(--ar-ink); font-weight: 700; text-decoration: none; transition: border-color .15s, transform .15s; }
.ar-top__cities a:hover { border-color: var(--ar-deep); transform: translateY(-1px); }
.ar-top__links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.ar-top__links a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--ar-line); color: var(--ar-deep-700); font-weight: 700; font-size: .88rem; text-decoration: none; }
.ar-top__links .ut-icon { width: 16px; height: 16px; }

/* treptele de duritate */
.ar-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.ar-pill--moale { background: var(--ar-moale); color: #075985; }
.ar-pill--medie { background: var(--ar-medie); color: #0c4a6e; }
.ar-pill--dura { background: var(--ar-fill-dura); color: #fff; }
.ar-band--moale { background: var(--ar-moale); }
.ar-band--medie { background: var(--ar-medie); }
.ar-band--dura { background: var(--ar-dura); }

/* secțiunile */
.ar-content { padding-bottom: 32px; }
.ar-sec { margin: 40px 0 0; }
.ar-h2 { margin: 0 0 14px; font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 800; color: var(--ar-ink); letter-spacing: -.01em; }
.ar-p { margin: 0 0 12px; max-width: 78ch; color: var(--ut-text); line-height: 1.65; }
.ar-note, .ar-hint { margin: 10px 0 0; max-width: 80ch; font-size: .84rem; line-height: 1.5; color: var(--ut-muted); }
.ar-links { margin: 12px 0 0; }
.ar-links a, .ar-p a, .ar-note a { color: var(--ar-deep-700); font-weight: 700; }
.ar-split { display: grid; gap: 18px; align-items: start; }

/* instrumentul */
.ar-tool { display: grid; gap: 16px; }
.ar-pick { display: grid; gap: 14px; padding: 16px; border-radius: 18px; background: var(--ar-soft); border: 1px solid var(--ar-line); }
.ar-pick__step { margin: 0; padding: 0; border: 0; min-width: 0; }
.ar-pick__step legend, .ar-pick__label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 800; color: var(--ar-ink); font-size: .95rem; }
.ar-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ar-deep); color: #fff; font-size: .8rem; font-weight: 800; }
.ar-cities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ar-city { position: relative; display: block; cursor: pointer; }
.ar-city input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ar-city span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--ar-line); min-height: 44px; }
.ar-city strong { color: var(--ar-ink); font-size: .92rem; }
.ar-city small { color: var(--ut-muted); font-size: .76rem; }
.ar-city input:checked + span { border-color: var(--ar-deep); box-shadow: 0 0 0 3px rgba(14, 116, 144, .15); }
.ar-city input:focus-visible + span { outline: 2px solid var(--ar-deep); outline-offset: 2px; }
.ar-select { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--ar-line); background: #fff; font: inherit; font-size: 1rem; color: var(--ar-ink); }
.ar-select:focus { outline: 2px solid var(--ar-deep); outline-offset: 1px; }

/* eticheta apei, ca pe o sticlă */
.ar-label, .ar-sheet { position: relative; padding: 18px 18px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--ar-line); box-shadow: 0 1px 2px rgba(8, 51, 68, .05), 0 10px 28px rgba(8, 51, 68, .07); }
.ar-label::before, .ar-sheet::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 18px 18px 0 0; background: linear-gradient(90deg, var(--ar-fill-moale), var(--ar-fill-medie), var(--ar-fill-dura)); }
.ar-label__kicker { margin: 0 0 4px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ar-deep-700); }
.ar-label__head h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--ar-ink); }
.ar-label__big { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.ar-label__big strong { font-size: 2rem; font-weight: 850; color: var(--ar-ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ar-label__conv { margin: 4px 0 0; font-size: .84rem; color: var(--ut-muted); }
.ar-label__table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: .9rem; }
.ar-label__table th, .ar-label__table td { padding: 8px 6px; border-top: 1px dotted #b6d5df; text-align: left; vertical-align: middle; }
.ar-label__table thead th { border-top: 0; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ut-muted); }
.ar-label__table tbody th { font-weight: 650; color: var(--ar-ink); }
.ar-v { font-weight: 800; color: var(--ar-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ar-v small { font-weight: 600; color: var(--ut-muted); font-size: .76rem; }
.ar-lim { color: var(--ut-muted); font-size: .8rem; min-width: 104px; }
.ar-lim__bar { display: block; height: 5px; margin-top: 4px; border-radius: 3px; background: #e2f2f7; overflow: hidden; max-width: 120px; }
.ar-lim__bar i { display: block; height: 100%; border-radius: 3px; background: var(--ar-deep); }
.ar-label__src { margin: 12px 0 0; font-size: .82rem; color: var(--ut-muted); }
.ar-label__src a { color: var(--ar-deep-700); font-weight: 700; }

/* rigla de duritate */
.ar-scale { margin: 34px 0 4px; }
.ar-scale__track { position: relative; height: 14px; border-radius: 7px; overflow: visible; background: #f1f5f9; }
.ar-scale__track .ar-band { position: absolute; top: 0; bottom: 0; }
.ar-scale__track .ar-band--moale { left: 0; border-radius: 7px 0 0 7px; }
.ar-scale__track .ar-band--dura { border-radius: 0 7px 7px 0; }
.ar-scale__span { position: absolute; top: 4px; height: 6px; border-radius: 3px; background: rgba(8, 51, 68, .35); }
.ar-scale__mark { position: absolute; top: -9px; width: 4px; height: 32px; margin-left: -2px; border-radius: 2px; background: var(--ar-ink); box-shadow: 0 0 0 2px #fff; }
.ar-scale__mark b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 2px; padding: 1px 6px; border-radius: 6px; background: var(--ar-ink); color: #fff; font-size: .72rem; white-space: nowrap; }
.ar-scale__ticks, .ar-scale__names { position: relative; height: 16px; margin-top: 6px; font-size: .7rem; color: var(--ut-muted); }
.ar-scale__ticks span { position: absolute; transform: translateX(-50%); }
.ar-scale__ticks span:first-child { transform: none; }
.ar-scale__ticks .ar-scale__end { right: 0; transform: none; }
.ar-scale__names { display: flex; height: auto; margin-top: 0; font-weight: 700; color: var(--ar-deep-700); }
.ar-scale__names span { text-align: center; }

/* ce ai acasă */
.ar-home { margin: 0; padding: 16px; border-radius: 18px; border: 1px solid var(--ar-line); background: #fff; min-width: 0; }
.ar-home legend { padding: 0 6px; font-weight: 800; color: var(--ar-ink); }
.ar-home__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-home__opts label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 40px; border-radius: 999px; background: var(--ar-soft); border: 1px solid var(--ar-line); font-size: .88rem; font-weight: 650; color: var(--ar-ink); cursor: pointer; }
.ar-home__opts input { width: 18px; height: 18px; accent-color: var(--ar-deep); }
.ar-home__cards, .ar-cards { display: grid; gap: 10px; margin-top: 14px; }
.ar-card { padding: 14px 16px; border-radius: 14px; background: var(--ar-soft); border: 1px solid var(--ar-line); }
.ar-card h4 { margin: 0 0 6px; font-size: .95rem; color: var(--ar-ink); }
.ar-card p { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--ut-text); }
.ar-groups { display: grid; gap: 22px; }
.ar-group h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 1rem; color: var(--ar-ink); }

/* comparația orașelor */
.ar-range { display: grid; gap: 8px; padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--ar-line); }
.ar-range__axis, .ar-range__row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 96px; align-items: center; gap: 12px; }
.ar-range__scale { position: relative; height: 16px; font-size: .7rem; color: var(--ut-muted); }
.ar-range__scale i { position: absolute; font-style: normal; transform: translateX(-50%); }
.ar-range__scale i:first-child { transform: none; }
.ar-range__scale i:last-child { transform: translateX(-100%); white-space: nowrap; }
.ar-range__name a { color: var(--ar-ink); font-weight: 750; text-decoration: none; }
.ar-range__name a:hover { color: var(--ar-deep); text-decoration: underline; }
.ar-range__track { position: relative; height: 22px; border-radius: 6px; overflow: hidden; }
.ar-range__track .ar-band { position: absolute; top: 0; bottom: 0; }
.ar-range__track .ar-band--moale { left: 0; }
.ar-range__bar { position: absolute; top: 7px; height: 8px; border-radius: 4px; background: var(--ar-deep); }
.ar-range__dot { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--ar-ink); }
.ar-range__val { font-size: .84rem; font-weight: 750; color: var(--ar-ink); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ar-range__row.is-current { background: var(--ar-soft); border-radius: 10px; box-shadow: 0 0 0 6px var(--ar-soft); }
.ar-range__keys { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: .76rem; color: var(--ut-muted); }
.ar-range__keys li { display: inline-flex; align-items: center; gap: 6px; }
.ar-range__keys i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.ar-range__keys .ar-range__key-bar { height: 6px; background: var(--ar-deep); }
.ar-range__keys .ar-range__key-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 3px solid var(--ar-ink); }

/* pagina orașului: fișa și rândurile pe zone */
.ar-sheet__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 14px 0 0; }
.ar-sheet__facts div { padding-top: 8px; border-top: 1px dotted #b6d5df; }
.ar-sheet__facts dt { font-size: .74rem; color: var(--ut-muted); }
.ar-sheet__facts dd { margin: 2px 0 0; font-weight: 800; color: var(--ar-ink); font-size: .92rem; font-variant-numeric: tabular-nums; }
.ar-rows { display: grid; gap: 2px; padding: 8px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--ar-line); }
.ar-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 132px; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px dotted #d3e7ee; }
.ar-row:first-child { border-top: 0; }
.ar-row__name strong { display: block; color: var(--ar-ink); font-size: .94rem; }
.ar-row__name small { display: block; color: var(--ut-muted); font-size: .76rem; line-height: 1.4; }
.ar-row__name a { color: var(--ar-deep-700); font-weight: 650; }
.ar-row__bar { height: 12px; border-radius: 6px; background: #eef7fa; overflow: hidden; }
.ar-fill { display: block; height: 100%; border-radius: 6px; }
.ar-fill--moale { background: var(--ar-fill-moale); }
.ar-fill--medie { background: var(--ar-fill-medie); }
.ar-fill--dura { background: var(--ar-fill-dura); }
.ar-row__val { text-align: right; font-size: .84rem; color: var(--ut-muted); }
.ar-row__val b { color: var(--ar-ink); font-size: .98rem; font-variant-numeric: tabular-nums; }
.ar-row__val small { display: block; font-size: .72rem; }
.ar-row__val a { color: var(--ar-deep-700); font-weight: 700; }
.ar-aside { padding: 16px; border-radius: 16px; background: var(--ar-soft); border: 1px solid var(--ar-line); }
.ar-aside h3 { margin: 0 0 8px; font-size: 1rem; color: var(--ar-ink); }
.ar-aside p { margin: 0 0 8px; font-size: .9rem; color: var(--ut-text); line-height: 1.55; }
.ar-aside a { color: var(--ar-deep-700); font-weight: 700; }
.ar-chips, .ar-others { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ar-chips a { display: inline-flex; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--ar-line); color: var(--ar-ink); font-weight: 650; font-size: .86rem; text-decoration: none; }
.ar-chips a:hover { border-color: var(--ar-deep); color: var(--ar-deep-700); }
.ar-others { flex-direction: column; gap: 6px; }
.ar-others li { color: var(--ut-text); font-size: .94rem; }
.ar-others a { color: var(--ar-deep-700); font-weight: 700; }
.ar-others .ut-icon { width: 13px; height: 13px; vertical-align: -1px; }

/* tabelele */
.ar-tablewrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--ar-line); border-radius: 14px; background: #fff; }
.ar-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ar-table th, .ar-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #e7f2f6; }
.ar-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ut-muted); background: #f5fbfd; white-space: nowrap; }
.ar-table tbody th { font-weight: 700; color: var(--ar-ink); }
.ar-table td small, .ar-table th small { display: block; font-size: .74rem; color: var(--ut-muted); font-weight: 500; }
.ar-table a { color: var(--ar-deep-700); font-weight: 750; text-decoration: none; }
.ar-table--conv td { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* drumul apei, până la robinet */
.ar-path { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: ar; }
.ar-path li { position: relative; padding: 14px 14px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--ar-line); counter-increment: ar; }
.ar-path li::before { content: counter(ar); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-bottom: 8px; border-radius: 50%; background: var(--ar-soft); color: var(--ar-deep-700); font-size: .76rem; font-weight: 800; }
.ar-path strong { display: block; color: var(--ar-ink); font-size: .92rem; }
.ar-path span { display: block; margin-top: 4px; color: var(--ut-text); font-size: .84rem; line-height: 1.45; }
.ar-path .is-edge { border: 2px dashed var(--ar-deep); background: var(--ar-soft); }

@media (min-width: 900px) {
  .ar-top__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; }
  .ar-split { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; }
  .ar-home__cards, .ar-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-tool { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; }
  .ar-tool .ar-home { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
  .ar-path { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .ar-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-range { padding: 12px; }
  .ar-range__axis, .ar-range__row { grid-template-columns: 82px minmax(0, 1fr) 70px; gap: 8px; }
  .ar-range__name a { font-size: .84rem; }
  .ar-range__val { font-size: .74rem; }
  .ar-row { grid-template-columns: minmax(0, 1fr) 96px; }
  .ar-row__bar { grid-column: 1 / -1; grid-row: 2; }
  .ar-label, .ar-sheet { padding: 16px 14px 14px; }
  .ar-label__big strong { font-size: 1.7rem; }
  .ar-lim { min-width: 0; }
  .ar-table { font-size: .84rem; }
  .ar-table th, .ar-table td { padding: 9px 8px; }
}
.ar-h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 22px 0 8px; font-size: 1.05rem; font-weight: 800; color: var(--ar-ink); }
.ar-h3 small { font-size: .8rem; font-weight: 600; color: var(--ut-muted); }
