/* Border crossings */
.page-hero:has(+ .border-traffic) { padding-block: clamp(18px, 3.25vw, 48px); }
.page-hero + .border-traffic { margin-top: clamp(24px, 3.1vw, 44px); }
.border-traffic { --border-entry: #1559d9; --border-exit: #087458; }
.border-toolbar, .border-filters { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.border-toolbar-title h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.045em; }
.border-status { margin-top: 6px; color: var(--muted); font-size: .88rem; }
.border-status:is([data-state="cached"], [data-state="unavailable"]) { color: #785012; }
.border-countries button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 7px 13px;
  border: 1px solid var(--concept-line); border-radius: 11px; background: #fff; color: #244263;
  font-size: .88rem; font-weight: 800;
}
.border-countries button:hover { background: #edf5ff; }
.border-method-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: #104bb2; font-size: .86rem; font-weight: 750; text-underline-offset: 3px; }
.border-method-link .icon { width: 16px; height: 16px; }
.border-filters { margin-top: 18px; padding: 10px; border: 1px solid var(--concept-line); border-radius: 16px; background: var(--concept-paper); }
.border-countries { display: flex; flex-wrap: wrap; gap: 5px; }
.border-countries button[aria-pressed="true"] { border-color: var(--concept-blue); background: var(--concept-blue); color: #fff; }
.border-search {
  min-width: min(100%, 270px); min-height: 42px; padding: 7px 11px;
  border: 1px solid var(--concept-line); border-radius: 11px; background: #fff; color: var(--ink); font-size: 1rem;
}
.border-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.border-list:empty { display: none; }
.border-crossing { display: flex; flex-direction: column; gap: 13px; padding: clamp(14px, 2.2vw, 22px); border: 1px solid var(--concept-line); border-radius: 20px; background: #fff; }
.border-crossing:has(.border-card-history:not([hidden])) { border-color: #b4cef5; }
.border-crossing-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.border-crossing-title h3 { display: flex; align-items: center; gap: 8px; font-size: clamp(1.05rem, 1.9vw, 1.28rem); overflow-wrap: anywhere; }
.border-crossing-title .border-location { width: 19px; height: 19px; color: var(--border-entry); }
.border-country { padding: 3px 8px; border-radius: 99px; background: #eef4fc; color: #3c506c; font-size: .76rem; font-weight: 750; }
.border-waits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.border-wait { padding: 10px; border-radius: 12px; background: #f0f5ff; }
.border-wait[data-direction="out"] { background: #edf7f3; }
.border-wait dt { display: flex; align-items: center; gap: 6px; color: #3c506c; font-size: .8rem; font-weight: 750; }
.border-direction-icon { width: 14px; height: 14px; color: var(--border-entry); transform: rotate(180deg); }
[data-direction="out"] .border-direction-icon { color: var(--border-exit); transform: none; }
.border-wait dd { display: flex; align-items: center; gap: 7px; margin: 4px 0 0; color: #3c506c; font-size: .88rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.border-clock { width: 16px; height: 16px; }
.border-crossing .border-wait dd[data-level] { font-size: 1.24rem; }
/* "Not reported" keeps the height of a time, so neighbouring cards stay aligned. */
.border-crossing .border-wait dd { min-height: 31px; }
.border-wait dd[data-level="short"] { color: #0c633d; }
.border-wait dd[data-level="medium"] { color: #88500b; }
.border-wait dd[data-level="long"] { color: #a62b33; }
.border-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.border-actions a, .border-source a { color: #104bb2; font-size: .84rem; font-weight: 750; text-underline-offset: 3px; }
.border-actions a, .border-card-graph {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 5px 9px;
  border: 1px solid #dce8fa; border-radius: 9px; background: #fff; color: #104bb2; font-size: .81rem; font-weight: 750; text-decoration: none;
}
.border-actions a:hover, .border-card-graph:hover { background: #edf5ff; }
.border-card-graph { gap: 5px; background: #eaf2ff; }
.border-card-graph[aria-expanded="true"] { background: var(--concept-blue); border-color: var(--concept-blue); color: #fff; }
.border-card-graph .icon { width: 15px; height: 15px; }
.border-card-graph[aria-expanded="true"] .border-graph-chevron { transform: rotate(180deg); }
.border-empty, .border-station-note { color: var(--muted); font-size: .88rem; }
.border-empty { margin-top: 16px; }
.border-card-history { min-width: 0; padding: 13px; border: 1px solid var(--concept-line); border-radius: 12px; background: #f5f9ff; }
.border-history-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-bottom: 6px; }
.border-history-heading h4 { margin: 0; font-size: .96rem; }
.border-history-heading > span { color: var(--muted); font-size: .79rem; }
.border-chart-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 8px 0 10px; }
.border-chart-date, .border-chart-directions { display: flex; align-items: center; gap: 4px; }
.border-chart-date time { padding: 0 3px; color: #263a59; font-size: .83rem; font-weight: 800; }
.border-chart-date button, .border-chart-directions button {
  display: inline-flex; justify-content: center; align-items: center; min-height: 36px;
  border: 1px solid #dbe7f8; border-radius: 8px; background: #fff; color: #244263; font-size: .8rem; font-weight: 750;
}
.border-chart-date button { min-width: 34px; padding: 0 5px; }
.border-chart-date button:disabled { opacity: .46; cursor: default; }
.border-chart-directions { flex-wrap: wrap; }
.border-chart-directions button { padding: 5px 8px; }
.border-chart-directions button[aria-pressed="true"] { border-color: #b8d1f5; background: #e1edff; color: #0d439d; }
.border-chart-arrow { width: 16px; height: 16px; transform: rotate(90deg); }
[data-chart-day="1"] .border-chart-arrow { transform: rotate(-90deg); }
.border-chart-note { color: var(--muted); font-size: .83rem; }
.border-hour-result { margin: 4px 0; color: #263a59; font-size: .86rem; font-weight: 750; }
.border-history-svg { display: block; width: 100%; color: #435971; font: 10px Manrope, system-ui, sans-serif; }
.border-history-svg text { fill: currentColor; }
.border-history-svg .border-chart-gridline { stroke: #dae7f6; }
.border-hour-bar { fill: #5684d5; cursor: pointer; }
.border-history-svg[data-direction="out"] .border-hour-bar { fill: #4a967f; }
.border-history-svg .border-hour-bar[data-latest] { fill: #174ba3; }
.border-history-svg[data-direction="out"] .border-hour-bar[data-latest] { fill: #11664f; }
.border-history-svg .border-hour-bar[data-missing] { fill: #cbd9eb; cursor: default; }
.border-hour-bar:focus-visible { stroke: #172e52; stroke-width: 2; outline: none; }
.border-method { padding: clamp(18px, 4vw, 45px); border: 1px solid var(--concept-line); border-radius: 24px; background: #f6f9ff; }
.border-method-heading h2 { display: flex; align-items: flex-start; gap: 10px; font-size: clamp(1.28rem, 3.2vw, 2.45rem); }
.border-method-heading .icon { width: 23px; height: 23px; margin-top: max(0px, calc((1lh - 23px) / 2)); color: #1559d9; }
.border-method-heading p, .border-method-steps p, .border-method-warning p { margin-top: 5px; color: #435971; font-size: .93rem; }
.border-method-heading > p { margin-inline-start: 33px; }
.border-method-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 18px 0; padding-left: 25px; }
.border-method-steps li { padding: 8px 0 8px 3px; }
.border-method-steps li::marker { color: #1559d9; font-weight: 800; }
.border-method-warning { padding: 13px; border: 1px solid #f4deb8; border-radius: 12px; background: #fff7e9; }
.border-method-warning strong { display: flex; align-items: center; gap: 8px; }
.border-method-warning .icon { width: 19px; height: 19px; color: #88500b; }
.border-method-warning > p { margin-inline-start: 27px; }
.border-source { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--concept-line); }
.border-source p { width: 100%; color: var(--muted); font-size: .88rem; }
@media (max-width: 700px) {
  .border-list { grid-template-columns: minmax(0, 1fr); }
  .border-search { width: 100%; }
  .border-crossing { border-radius: 16px; }
  .border-method-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .border-history-svg { font-size: 12px; }
  .border-history-svg :is([data-axis-hour="4"], [data-axis-hour="12"], [data-axis-hour="20"]) { display: none; }
}
