:root {
  --bg: #0e0f13; --panel: #14161c; --line: #232733;
  --ink: #e6e8ee; --dim: #8b93a7; --accent: #ff8a5c; --green: #5ac8a0; --blue: #6ea8ff;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
header { padding: 22px 24px 12px; max-width: 1560px; margin: 0 auto; }
h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
h1 span { color: var(--accent); }
header p { margin: 8px 0 0; color: var(--dim); font-size: 13px; max-width: 72ch; line-height: 1.6; }
header a { color: var(--blue); }
main { max-width: 1560px; margin: 0 auto; padding: 8px 24px 40px;
       display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.stage { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; position: relative; }
canvas { display: block; border-radius: 6px; touch-action: none; }
#view { cursor: grab; }
#view.dragging { cursor: grabbing; }
.hint { margin: 8px 2px 2px; font-size: 11px; color: var(--dim); }
aside { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; }
.card h2 { margin: 0 0 10px; font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.row { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; }
.row span:last-child { color: var(--accent); font-variant-numeric: tabular-nums; }
.controls { display: flex; flex-wrap: wrap; gap: 6px; }
.controls + .controls { margin-top: 8px; }
.controls-col .sub { font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin: 14px 0 6px; }
.controls-col .sub.first { margin-top: 0; }
button { font: inherit; font-size: 11px; padding: 6px 10px; border-radius: 6px; cursor: pointer;
         background: #1c1f28; color: var(--ink); border: 1px solid var(--line); }
button:hover { border-color: #39405a; }
button[data-on="true"] { background: var(--accent); color: #16110e; border-color: var(--accent); }
.legend { font-size: 10.5px; color: var(--dim); line-height: 1.8; margin-top: 8px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
footer { max-width: 1560px; margin: 0 auto; padding: 0 24px 50px; color: var(--dim); font-size: 12px; line-height: 1.7; }
footer a { color: var(--blue); }
/* Three columns when there is room: the city, its numbers, the controls. The
   controls stay in view while the page scrolls. With less room the controls
   go to the top of the side column, and on a phone everything stacks. */
main { grid-template-columns: minmax(0, 1fr) 280px 230px; grid-template-areas: "stage data controls"; }
.stage { grid-area: stage; min-width: 0; }
.data-col { grid-area: data; }
.controls-col { grid-area: controls; position: sticky; top: 12px; }
@media (max-width: 1240px) {
  main { grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: "stage controls" "stage data"; grid-template-rows: auto 1fr; }
  .controls-col { position: static; }
}
@media (max-width: 900px) {
  main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "controls" "data"; }
}

/* the views of the project, one click apart */
nav.views { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 14px; font-size: 12px; }
nav.views a { color: var(--dim); text-decoration: none; }
nav.views a:hover { color: var(--ink); }
nav.views a.here { color: var(--accent); }

/* the "what am I looking at" key under the intro */
details.key { margin-top: 10px; max-width: 72ch; font-size: 12.5px; color: var(--dim); }
details.key summary { cursor: pointer; color: var(--blue); }
details.key ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.6; }
details.key b { color: var(--ink); font-weight: 600; }

/* the view's hint, in the words of the device in hand */
.hint .touch { display: none; }
@media (pointer: coarse) {
  .hint .mouse { display: none; }
  .hint .touch { display: inline; }
}
