/* BreachClock dams page: the EU screening and the checks of the flood model. */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { display: flex; flex-direction: column; font: 15px/1.45 var(--font); color: var(--ink); background: var(--ground); }
button, select { font: inherit; color: inherit; }
a { color: inherit; }

.top { display: flex; align-items: center; gap: 20px; height: 56px; padding: 0 24px; border-bottom: 1px solid var(--rule); flex: none; }
.brand { font-size: 18px; font-weight: 800; text-decoration: none; }
.title { font-weight: 700; padding-left: 20px; border-left: 1px solid var(--rule); }
.tag { border: 1.5px solid var(--ink); padding: 3px 7px 1px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; white-space: nowrap; }
#switch { max-width: 250px; }
.leave { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.leave b { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.leave b.act { color: var(--act-ink); }
.timerow { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.timerow input { flex: 1; accent-color: var(--ink); }
.timerow b { font-variant-numeric: tabular-nums; white-space: nowrap; }
#route-card { margin-top: 12px; }
.top nav { margin-left: auto; display: flex; gap: 20px; font-size: 14px; font-weight: 700; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

.layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 460px; min-height: 0; }
.mapcol { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
#map { flex: 1; min-height: 320px; background: var(--map-land); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 9px 16px 7px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-2); min-height: 36px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend i { width: 16px; height: 10px; display: inline-block; }
.legend i.dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #111; }
.attr { padding: 4px 16px 8px; font-size: 11px; color: var(--ink-2); }

.panel { border-left: 1px solid var(--rule); overflow-y: auto; min-height: 0; }
.sec { padding: 20px 24px; border-bottom: 1px solid var(--rule); }
.sec h2 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.sec h1 { font-size: 26px; font-weight: 800; line-height: 1.15; margin-bottom: 4px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
p + p { margin-top: 8px; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; margin-top: 12px; }
.kpis div { border-top: 2px solid var(--ink); padding-top: 8px; }
.kpis b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpis span { display: block; font-size: 12px; color: var(--ink-2); margin-top: 3px; }

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.btn { padding: 8px 12px 6px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ground); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn.on { background: var(--ink); color: var(--ground); }
.btn.back { border: 0; padding-left: 0; text-decoration: underline; }
select { padding: 7px 8px 5px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ground); font-weight: 600; font-size: 13px; }
.btn:focus-visible, select:focus-visible { outline: 3px solid var(--soon); outline-offset: 2px; }

table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-2); border-bottom: 2px solid var(--ink); padding: 6px 8px 5px 0; vertical-align: bottom; }
td { border-bottom: 1px solid var(--rule); padding: 7px 8px 5px 0; vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; padding-left: 8px; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--hover); }
.qa { display: inline-block; padding: 2px 6px 0; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; border: 1.5px solid var(--ink); vertical-align: 2px; }
.qa.warn { border-color: var(--soon-ink); color: var(--soon-ink); }
.qa.fail { border-color: var(--act-ink); color: var(--act-ink); }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; margin-top: 10px; }
dl.facts dt { color: var(--ink-2); }
dl.facts dd { font-weight: 700; font-variant-numeric: tabular-nums; }
ul.reasons { margin: 6px 0 0 18px; font-size: 13px; color: var(--ink-2); }
.checks a { display: block; border-top: 2px solid var(--ink); padding: 10px 0 12px; text-decoration: none; cursor: pointer; }
.checks a b { display: block; font-size: 15px; font-weight: 800; }
.checks a span { display: block; font-size: 13px; color: var(--ink-2); }
.checks a:hover b { text-decoration: underline; }
.maplibregl-ctrl-attrib { font: 11px var(--font); }

@media (max-width: 1000px) {
  body { height: auto; }
  .top { height: auto; flex-wrap: wrap; gap: 6px 16px; padding: 8px 16px; }
  .title { border-left: 0; padding-left: 0; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  #map { height: 56vh; flex: none; }
  .panel { border-left: 0; border-top: 1px solid var(--rule); overflow: visible; }
  .sec { padding: 18px 16px; }
}
