:root {
  color-scheme: light;
  --ink: #14201f;
  --muted: #62716d;
  --line: #dbe4df;
  --surface: #ffffff;
  --soft: #edf4f1;
  --deep: #164b46;
  --blue: #1e6fa8;
  --green: #18784d;
  --amber: #b56b09;
  --red: #b13535;
  --shadow: 0 20px 60px rgba(25, 48, 44, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(246, 249, 247, 0.62), rgba(246, 249, 247, 0.74)),
    url("https://commons.wikimedia.org/wiki/Special:FilePath/Oudenaarde_-_Scheldt_1.jpg") center/cover fixed;
}

.bg-word {
  position: fixed;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  font-size: clamp(4rem, 18vw, 18rem);
  font-weight: 800;
  letter-spacing: 0;
  color: rgba(13, 47, 43, 0.055);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

button,
input {
  font: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 82px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.photo-credit {
  margin: -14px 0 20px;
  color: var(--muted);
  font-size: 0.78rem;
}

.refresh-wrap {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

.refresh-wrap span {
  display: inline-block;
  margin-bottom: 6px;
}

.refresh-now {
  margin-left: 8px;
  height: 24px;
  border: 1px solid var(--deep);
  border-radius: 6px;
  background: var(--deep);
  color: #fff;
  cursor: pointer;
}

.refresh-track {
  width: min(420px, 100%);
  height: 8px;
  border-radius: 999px;
  background: rgba(22, 75, 70, 0.14);
  overflow: hidden;
}

.refresh-bar {
  width: 100%;
  height: 100%;
  background: var(--deep);
  transform-origin: left center;
}

.kicker {
  margin: 0 0 8px;
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 400;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1rem, 2.5vw, 2.4rem);
  line-height: 0.98;
  max-width: 850px;
}

h2 {
  font-size: 1.15rem;
  margin-bottom: 0;
}

.clock {
  min-width: 190px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  text-align: right;
  box-shadow: var(--shadow);
}

.clock span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.clock strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
}

.dashboard {
  display: grid;
  grid-template-columns: 300px minmax(360px, 1fr) 430px;
  gap: 16px;
  align-items: start;
}

.panel,
.bridge-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.filters,
.detail {
  padding: 18px;
}

.search {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.geo-filters {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.geo-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.geo-filters select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.segmented button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.segmented button.active {
  border-color: var(--deep);
  background: var(--deep);
  color: #fff;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.metric span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 1.9rem;
}

.source-note {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: #f9f1e6;
  color: #51390d;
}

.source-note p {
  margin: 6px 0 0;
  color: #72531c;
  line-height: 1.45;
}

.bridge-list {
  min-height: 620px;
  padding: 18px;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.list-header span {
  color: var(--muted);
  font-size: 0.9rem;
}

.cards {
  display: grid;
  gap: 12px;
}

.bridge-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.bridge-card:hover,
.bridge-card.active {
  border-color: var(--blue);
  box-shadow: 0 12px 24px rgba(30, 111, 168, 0.12);
}

.bridge-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.camera-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  cursor: pointer;
  vertical-align: middle;
}

.bridge-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.camera-icon {
  width: 14px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  display: inline-block;
  position: relative;
  color: var(--muted);
}

.camera-icon::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  left: 4px;
  top: 1px;
}

.camera-icon::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 2px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  left: 1px;
  top: -4px;
}

.camera-icon.camera-off::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 4px;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(-28deg);
  border: 0;
  border-radius: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 32px;
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.status-closed {
  background: var(--green);
}

.status-open {
  background: var(--red);
}

.status-moving {
  background: var(--amber);
}

.status-unknown {
  background: var(--muted);
}

.detail-hero {
  min-height: 230px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
}

.detail-hero iframe {
  width: 100%;
  height: 230px;
  border: 0;
  display: block;
}

.detail-body {
  padding-top: 16px;
}

.detail-body h2 {
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.detail-body .location {
  color: var(--muted);
  margin-bottom: 14px;
}

.facts {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.fact {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.fact span {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: var(--deep);
  text-decoration: none;
  font-weight: 800;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.visitor-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 4;
}

.visitor-bar span {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.84rem;
}

.visitor-bar strong {
  font-size: 1.25rem;
  line-height: 1;
}

.hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 15, 0.55);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 16px;
}

.modal-panel {
  width: min(900px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-head {
  height: 52px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 14px;
}

.icon-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}

.modal-body {
  min-height: 220px;
  max-height: 70vh;
  display: grid;
  place-items: center;
  background: #f6faf8;
}

.modal-body iframe,
.modal-body img {
  width: min(100%, 860px);
  height: 70vh;
  border: 0;
}

.modal-message {
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

@media (max-width: 1120px) {
  .dashboard {
    grid-template-columns: 280px 1fr;
  }

  .detail {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 680px);
    padding: 18px 0;
  }

  .topbar,
  .list-header {
    align-items: stretch;
    flex-direction: column;
  }

  .clock {
    width: 100%;
    text-align: left;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .bridge-list {
    min-height: auto;
  }

  .bridge-card {
    grid-template-columns: 1fr;
  }

  .badge {
    width: fit-content;
  }
}
