/* Same dark dashboard look as the global wave forecast at the domain root
   (global_wave_forecasts repo, site/style.css) - keep the tokens in step. */
:root {
  --bg: #070a0f; --panel: #0d1219; --panel2: #121924; --line: #1c2733; --text: #d7e0ea; --dim: #7c8a9a;
  --accent: #3ad6c5; --warn: #f2a01d;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 13px/1.45 -apple-system, "Segoe UI", Inter, Roboto, sans-serif; display: flex; flex-direction: column; }
.mono { font-family: var(--mono); }
button { font: inherit; color: inherit; }
a { color: var(--accent); }

#top { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font: 700 13px var(--mono); letter-spacing: .14em; color: var(--accent); white-space: nowrap; }
.brand b { color: var(--text); font-weight: 700; }
a.brand { text-decoration: none; }
.brand-h { margin: 0; font: inherit; }   /* the page heading, for search engines; looks like the plain link */
a.brand:hover b { color: var(--accent); }
.brand img { border-radius: 7px; border: 1px solid var(--line); flex: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: 11px var(--mono); letter-spacing: .06em; padding: 4px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel2); color: var(--dim); white-space: nowrap; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 1px; box-shadow: 0 0 6px var(--accent); }
.dot.live { animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; }
.top-right a { color: var(--dim); text-decoration: none; white-space: nowrap; }
.top-right a:hover { color: var(--accent); }

#grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr) 410px; }
#left, #center, #right { overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#left { border-right: 1px solid var(--line); }
#right { border-left: 1px solid var(--line); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px; min-width: 0; }
.panel h2 { margin: 0 0 8px; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; flex-wrap: wrap; }
.panel h2 .keys { margin-left: auto; letter-spacing: .08em; font-weight: 400; }
.keys i { font-style: normal; }
.keys i::before { content: ""; display: inline-block; width: 9px; height: 3px; margin: 0 4px 2px 10px; background: currentColor; vertical-align: middle; }
/* Bottom bar: copyright, disclaimer and the data-sources popover - same as
   the global wave forecast's. */
/* Links to the other Cross Step Labs pages, set off from the legal text by a rule. */
#legal .apps { display: flex; gap: 14px; padding-right: 18px; border-right: 1px solid var(--line); }
#legal .apps a { color: var(--text); text-decoration: none; white-space: nowrap; }
#legal .apps a:hover { color: var(--accent); }
#legal { flex: none; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 18px; color: var(--dim); font-size: 11px; padding: 5px 14px; border-top: 1px solid var(--line); background: var(--panel); position: relative; }
#sources summary { cursor: pointer; list-style: none; text-decoration: underline dotted; text-underline-offset: 3px; }
#sources summary::-webkit-details-marker { display: none; }
#sources summary:hover, #sources[open] summary { color: var(--accent); }
.sources-pop { position: absolute; z-index: 40; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: min(460px, calc(100vw - 32px)); background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; box-shadow: 0 8px 24px #000a; text-align: left; font-size: 12px; line-height: 1.5; color: var(--text); }
.sources-pop p { margin: 0 0 6px; }
.sources-pop p:last-child { margin: 0; color: var(--dim); }
.sources-pop b { color: var(--dim); font-weight: 600; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.muted { color: var(--dim); font-size: 12px; }

#map { height: 250px; border-radius: 4px; overflow: hidden; background: #05080c; margin-bottom: 8px; }
.maplibregl-ctrl-group { background: var(--panel) !important; border: 1px solid var(--line); }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
.maplibregl-ctrl-group .maplibregl-ctrl-icon { filter: invert(1) brightness(.8); }
.pin { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font: 600 11px var(--mono); color: var(--text); white-space: nowrap; }
.pin i { width: 12px; height: 12px; border-radius: 50%; background: #05080c; border: 2px solid var(--dim); }
.pin span { background: #0d1219e6; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; transform: translateX(var(--dx, 0)); }
.pin.up span { position: absolute; bottom: 100%; margin-bottom: 4px; }
.pin.right span { position: absolute; left: 100%; top: 50%; margin-left: 5px; transform: translateY(-50%); }
.pin.left span { position: absolute; right: 100%; top: 50%; margin-right: 5px; transform: translateY(-50%); }
.pin.on i { border-color: #fff; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.pin.on span { border-color: var(--accent); color: var(--accent); }
.list button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: 4px; padding: 6px 8px; cursor: pointer; color: var(--text); }
.list button:hover { background: var(--panel2); }
.list button.on { background: #10262b; border-color: #1f5a57; color: var(--accent); }
.list button span { margin-left: auto; font-family: var(--mono); color: var(--dim); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.tile.wide { grid-column: 1 / -1; }
.tile { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; min-width: 0; }
.tile label { display: block; font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile strong { font: 600 17px var(--mono); }
.tile small { color: var(--dim); font-size: 10px; margin-left: 3px; }
.arr { display: inline-block; color: var(--accent); }

.chart-box { position: relative; min-height: 40px; }
svg.chart { width: 100%; display: block; cursor: crosshair; touch-action: pan-y; }
svg.chart text { font: 10px var(--mono); fill: var(--dim); }
#tip { position: fixed; z-index: 30; pointer-events: none; background: #0d1219f2; border: 1px solid var(--line); border-radius: 4px; padding: 6px 9px; font-size: 11px; line-height: 1.5; white-space: nowrap; box-shadow: 0 6px 20px #000a; }
#tip b { color: var(--text); }

.table-wrap { overflow-x: auto; }
table.days { width: 100%; border-collapse: collapse; font-size: 12px; }
table.days th { white-space: nowrap; font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); text-align: left; padding: 3px 5px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
table.days td { padding: 4px 5px; border-bottom: 1px solid #141c27; font-family: var(--mono); white-space: nowrap; }
table.days tr.day td { padding-top: 10px; color: var(--accent); font-weight: 600; letter-spacing: .06em; border-bottom-color: var(--line); }
table.days .bar { display: inline-block; height: 8px; border-radius: 2px; vertical-align: middle; margin-right: 6px; background: var(--accent); }
.trend-high { color: #7fb2ff; font-weight: 600; }
.trend-low { color: var(--warn); font-weight: 600; }
.trend-rising, .trend-falling { color: var(--dim); }

@media (max-width: 1100px) {
  body { height: auto; }
  #grid { display: flex; flex-direction: column; }
  #left, #center, #right { border: 0; overflow: visible; }
  .pair { grid-template-columns: 1fr; }
  .brand { white-space: normal; font-size: 12px; letter-spacing: .1em; }
  #top { gap: 8px 10px; padding: 8px 10px; }
  .top-right { margin-left: 0; width: 100%; justify-content: flex-end; }
  #clock { display: none; }
  #legal .apps { width: 100%; justify-content: center; padding: 0 0 4px; border-right: 0; border-bottom: 1px solid var(--line); }
}
