/* The street and intersection editors, in the same world as the map: a light page,
   a few white floating cards, one blue for what is chosen and amber for what does
   not fit. Loaded after app.css, which holds the tokens, the bar, the menu and the
   cards. */

:root {
  /* What the editors draw, beyond the map's tints. */
  --sky: light-dark(#e9f3fb, #17222e);
  --s-tree: light-dark(#6fb35e, #55924a);
  --s-car: light-dark(#dfe5ec, #3a4651);
  --s-bus: light-dark(#f2a99b, #8a4b43);
  --s-van: light-dark(#f1cd55, #c0a02c);
  --s-coat-0: light-dark(#ee9b78, #d27753);
  --s-coat-1: light-dark(#74aede, #5590c4);
  --danger: light-dark(#b8231a, #ff8073);
  --dark-hatch: light-dark(#aeb8c2, #8c98a4);
  /* The asphalt of a street in section: a little darker than the map's white road. */
  --k-travel: light-dark(#c3cbd3, #333c45);
  --k-parking: light-dark(#b4bdc7, #3d4750);
  /* A curb in 2.5D: a concrete grey, darker than a sidewalk so that its stripe shows on one. */
  --iso-curb: light-dark(#a3adb8, #6b7783);
  /* Pavement paint in 2.5D: white and yellow, each a little off the pure colour so that it sits on the asphalt
     in both themes. Estimates, like the symbols' sizes. */
  --iso-paint-white: light-dark(#fbfbf8, #e6e9ee);
  --iso-paint-yellow: light-dark(#e3a600, #f0c02e);
  /* A hairline round the paint, in both themes: the materials are one colour in either theme, so the paint alone
     is under 3:1 (WCAG 1.4.11) on a pale one (white on concrete) whatever the theme; the edge is over 6:1 against
     those (the ratio of the colours; anti-aliasing of a 0.5 px line lowers the figure rendered). */
  --iso-paint-edge: #10151a;
  /* The small drawings of a signal's phases: the road they are drawn on, what runs (lit, the accent's blue) and what
     does not (muted, a dashed outline), each 3:1 against the road in both themes (a test measures them). */
  --ph-road: light-dark(#e3e8ed, #27303a);
  --ph-lit: light-dark(#1b4fc0, #8ab4ff);
  --ph-muted: light-dark(#5d6875, #8d98a5);
  /* The speed limit sign in 2.5D: a white panel with black text, the same in both themes like the materials (a test
     in street/view/iso/sign.rs measures the text on the panel). */
  --iso-sign-panel: #fbfbf8;
  --iso-sign-ink: #10151a;
  /* The selection outline in 2.5D: a light line on a dark casing, the same in both themes like the materials, so
     that one of the two is 3:1 against any of them (a test in street/view/iso/surface.rs). */
  --iso-sel: #8ab4ff;
  --iso-sel-casing: #0b1220;
  /* The outline of a rain garden or a bioswale in 2.5D, drawn inside its dark fill: the same in both themes like the
     materials, 3:1 against the fill (a test in shared/contrast.rs). */
  --iso-green-edge: #bfe6d0;
  /* The cells of the rows along the street and of the piece list: their fill, the text on it, the edges between cells
     and the chosen cell's outline; each is measured against the fill and the panel by a test in shared/contrast.rs. */
  --zone-fill: light-dark(#eef2f6, #262e36);
  --zone-ink: light-dark(#111827, #e8edf2);
  --zone-edge: light-dark(#536070, #9aa6b2);
  --zone-sel: light-dark(#1f5ee0, #8ab4ff);
  /* The plan (street/view/plan/): the picked stretch, a tint of its edge's blue with a light edge on a dark casing,
     and the plan's marks (a boundary, a cut end, a taper, a thing), a light line on a dark casing; the same in both themes like
     the materials the bands are drawn in, so that one of each two tones is 3:1 against any material and the panel
     (tests in shared/contrast.rs). */
  --plan-pick-edge: #8ab4ff;
  --plan-pick-casing: #0b1220;
  --plan-mark: #fbfbf8;
  --plan-mark-casing: #10151a;
  --panel-w: 300px;
  --notes-w: 340px;
  --rw: calc(var(--pad) + var(--notes-w));
  --kc: transparent;
  /* Rust-drawn swatches still fill with this name. */
  --sheet: var(--panel);
}

/* ---- the page: bar, two cards, and a column of work between them ---------- */

.bar {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.bar .surfaces {
  justify-self: start;
}
.tab {
  white-space: nowrap;
  padding-inline: 8px;
}
.panel-body {
  padding: 14px 20px 18px;
  /* a row never ends in a hard cut: the scroller fades out into the bottom padding */
  mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
}
.stage {
  display: block;
}
.stage-main {
  position: absolute;
  top: calc(var(--pad) + var(--bar-h) + 12px);
  bottom: var(--pad);
  /* the sidebars' edge tabs stand in the room between the drawing and each side */
  left: calc(var(--lw) + var(--tab-w));
  right: calc(var(--rw) + var(--tab-w));
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 2px 4px;
}
:root[data-inspector="closed"] .stage-main {
  left: var(--tab-w);
}
:root[data-notes="closed"] .stage-main {
  right: var(--tab-w);
}
.stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.title-card {
  min-width: 0;
  padding: 10px 20px 11px;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
#street-name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.street-sub {
  margin: 2px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  color: var(--ink-2);
  font-size: 14px;
}
.street-sub a {
  color: var(--ink-2);
}
.street-sub .fig {
  color: var(--ink);
  font-weight: 600;
}
.street-steps {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* The two arrows are the page's secondary buttons (.btn); the one with no street to go on to is drawn as a
   disabled one, and stays in the reading order for a screen reader. */
.street-steps .street-step-none,
.street-steps .street-step-none:hover:not(:disabled) {
  background: var(--panel);
  color: var(--ink-3);
  opacity: 0.6;
  cursor: default;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.back svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.tools .btn {
  min-height: 38px;
}
.btns {
  display: contents;
}
/* A place's scenarios (#190): which design is shown, said in words as well as by the accent edge a scenario gets,
   and the actions on them under a disclosure. */
.scenario-slot:empty {
  display: none;
}
/* In the head's row beside the title card (the street and junction pages): a basis small enough to fit beside it in
   a wide typeface, growing to 30rem where there is room. Its width comes
   from the row, never from what it holds, so a longer label (Delete becoming Confirm delete) wraps inside it and moves
   nothing beside it. */
.scenario-slot {
  flex: 1 1 18rem;
  min-width: 0;
  max-width: min(30rem, 100%);
}
.scenarios {
  display: grid;
  /* a track that may be narrower than its content: the menu holds the names, and a long one must not widen it */
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  box-sizing: border-box;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.scenario-h {
  margin: 0 4px 0 0;
  font-size: 14px;
  font-weight: 700;
}
.scenario-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
/* The link to the comparison page is in the row, not under the disclosure (it manages nothing and stays usable
   read-only): in a narrow slot it wraps below the menu with the row. */
.scenario-row .btn {
  box-sizing: border-box;
  min-height: 32px;
}
.scenario-row label,
.scenario-manage label {
  font-weight: 600;
}
#scenario-pick,
#scenario-name {
  box-sizing: border-box;
  min-width: 0;
  min-height: 32px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}
#scenario-name {
  width: 100%;
}
#scenario-pick:focus-visible,
#scenario-name:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
/* A scenario's name is the person's: one with no spaces still wraps, so a narrow window never scrolls sideways
   (WCAG 1.4.10), as `.path-here` does. */
.scenario-mode,
.scenario-refusal {
  overflow-wrap: anywhere;
}
.scenario-mode {
  margin: 0;
  padding-left: 8px;
  border-left: 3px solid var(--field-line);
  color: var(--ink-2);
  font-size: 13px;
}
.scenario-mode.in-scenario {
  border-left-color: var(--accent);
  color: var(--ink);
}
.scenario-manage[open] {
  display: grid;
  gap: 6px;
}
#scenario-name[aria-invalid="true"] {
  border-color: var(--warn);
}
.scenario-refusal {
  margin: 0;
  color: var(--warn);
  font-size: 13px;
}
.scenario-refusal:empty {
  display: none;
}
.scenario-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  /* Room of its own above the buttons (the open details' gap does not reach its content): more than a focus ring
     reaches (2 px outline, 2 px offset), so it never draws over the refusal above. */
  margin-top: 8px;
}
.scenario-actions .btn {
  min-height: 36px;
}
/* Delete and Confirm delete share one cell: the button keeps the width of the longer label in any language. */
.swap {
  display: inline-grid;
}
.swap > span {
  grid-area: 1 / 1;
}
.swap > .swap-off {
  visibility: hidden;
}
.stuck {
  max-width: 56ch;
  padding: 24px 28px;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.stuck p {
  margin: 0 0 12px;
}
.stuck .note-h {
  padding: 0 0 8px;
  font-size: 17px;
}

/* ---- the editors' layout: the drawing's column, the details on the right, the notes as a tray under it -----
   Layout option 1 of the editors' review (docs/superpowers/specs/2026-11-14-street-editor-layout-design.md), on the
   street page and, since CLM-32, the junction page (docs/superpowers/specs/2026-11-22-junction-editor-layout-design.md):
   both bodies carry .tray-page, and everything here is under it. The compare page shares this file. The column
   is three parts: the title and tools, which never scroll away; the drawing and the strips, which scroll; and the
   notes' tray, whose handle (the status line, the tabs, the toggle) is always in view and whose body opens above it.
   The tray's own styles are in tray.css (`shell::tray`). */

.tray-page {
  --lw: 0px;
  --rw: calc(var(--pad) + var(--notes-w));
}
:root[data-inspector="closed"] .tray-page {
  --rw: 0px;
}
:root[data-inspector="closed"] .panel.details {
  display: none;
}
@media (min-width: 900px) {
  .panel.details {
    right: var(--pad);
    bottom: var(--pad);
    width: var(--notes-w);
  }
  /* `:root` matches the specificity of the rules above that move the column's edges as the sidebars open and close,
     and comes after them: on the street page the column runs from the window's edge to the details' edge tab. */
  :root .tray-page .stage-main {
    left: var(--pad);
    right: calc(var(--rw) + var(--tab-w));
    overflow: hidden;
  }
  .stage-scroll {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    /* room for the focus outline of what is at its edges */
    padding: 2px;
  }
  .tray-page .stage-head {
    flex: none;
  }
  /* The junction's card is as tall as its drawing, which is laid out to the room the column leaves it
     (`junction::view::drawing::frame_of`): grown to fill the column, the card would hold slack the drawing then
     measured as its own. */
  .tray-page .plan-drawing {
    flex: none;
  }
}

/* ---- the drawing ----------------------------------------------------------- */

.drawing {
  position: relative;
  inset: auto;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  min-height: 0;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.drawing > .scroll {
  display: flex;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 6px 6px;
}
.wrap {
  flex: none;
  width: 100%;
  min-width: 600px;
  margin-block: auto;
  outline-offset: -2px;
  border-radius: var(--r-ctl);
}
.plan-drawing .wrap,
.wrap.iso-view {
  min-width: 0;
}
.plan-drawing > .scroll {
  overflow: hidden;
}
/* The street's group is as tall as the taller of its two views (street/view/mod.rs); the shorter is centred. A drawing
   laid out narrower than the group, to fit the column's height on the street page, is centred across too. */
.wrap.views {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.wrap:focus-visible {
  outline: 2px solid var(--accent);
}
#drawing {
  display: block;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
}

.fit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
}
.fit-checks {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--warn-wash);
  color: var(--warn);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.fit-checks:hover {
  box-shadow: inset 0 0 0 1px var(--warn-line);
}
.fit-checks[hidden] {
  display: none;
}
/* Always in flow, shown by visibility: focusing the drawing or leaving it never changes the stage's height, so a
   press on a strip below the fold is not moved from under the pointer. */
.focus-hint {
  display: block;
  visibility: hidden;
  margin: 0;
  max-width: 70ch;
  color: var(--ink-2);
  font-size: 13px;
  text-align: center;
}
.stage-main:has(.wrap:focus-visible) .focus-hint {
  visibility: visible;
}
.cue {
  display: none;
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
}
.cue.on {
  display: block;
}

.welcome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 16px;
  background: var(--accent-wash);
}
.welcome p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
:root[data-welcome="seen"] .welcome {
  display: none;
}

.clock {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) 3.4em;
  align-items: center;
  gap: 2px 12px;
  padding: 10px 18px 12px;
  border-top: 1px solid var(--rule);
}
.clock[hidden] {
  display: none;
}
.clock-l {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}
.clock input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.clock output {
  font-size: 16px;
  font-weight: 600;
  text-align: right;
}
.clock-scale {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  color: var(--ink-3);
  font-size: 13px;
}
.clock-bar {
  position: relative;
  grid-column: 2;
  height: 6px;
  border-radius: 3px;
  background: var(--fill);
  visibility: hidden;
}
.clock-bar.on {
  visibility: visible;
}
.clock-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
}
.clock-note {
  grid-column: 2;
  margin: 0;
  min-height: 1.2em;
  color: var(--ink-2);
  font-size: 14px;
}
.clock-bar:not(.on),
.clock-note:empty {
  display: none;
}
.clock:not(:has(.clock-bar.on)) .clock-scale {
  display: none;
}

/* ---- the drawing's own marks ----------------------------------------------- */

#drawing text {
  font-family: var(--font);
  fill: var(--ink);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
#drawing .t-dim {
  font-size: 15px;
  font-weight: 500;
}
#drawing .t-mark {
  font-size: 15px;
  font-weight: 600;
}
#drawing .t-note {
  font-size: 14px;
  font-weight: 500;
}
#drawing .t-halo {
  paint-order: stroke;
  stroke: var(--panel);
  stroke-width: 4px;
  stroke-linejoin: round;
}
#drawing .t-warn {
  fill: var(--warn);
  font-weight: 600;
}
#drawing .t-blue {
  fill: var(--accent);
  font-weight: 600;
}

.ground {
  stroke: var(--ink-2);
  stroke-width: 3;
}
.dim {
  stroke: var(--ink-2);
  stroke-width: 0.9;
  fill: none;
}
.dim-warn {
  stroke: var(--warn-line);
}
.bound {
  stroke: var(--ink-3);
  stroke-width: 0.9;
  stroke-dasharray: 5 4;
}
.rw {
  stroke: var(--ink-2);
  stroke-width: 1.2;
  stroke-dasharray: 12 3 2 3;
}
/* A faint texture under the flat tints, so colour is not the only thing that tells the pieces apart. */
.hatch {
  stroke: none;
  opacity: 0.3;
}
.sel-box {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  pointer-events: none;
}
.free {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.sky {
  fill: var(--sky);
  pointer-events: none;
}
.sym * {
  fill: var(--panel);
  stroke: var(--ink-2);
  stroke-width: 1.2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.sym .o {
  fill: none;
}
.sym .f-tree {
  fill: var(--s-tree);
}
.sym .f-car {
  fill: var(--s-car);
}
.sym .f-bus {
  fill: var(--s-bus);
}
.sym .f-van {
  fill: var(--s-van);
}
.sym .f-coat-0 {
  fill: var(--s-coat-0);
}
.sym .f-coat-1 {
  fill: var(--s-coat-1);
}
.sym .f-buffer {
  fill: var(--k-buffer);
}
.sym .f-kerb {
  fill: var(--k-median);
}
.sym .f-share {
  fill: var(--k-bikeshare);
}
svg pattern * {
  stroke: var(--ink-2);
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
}
svg pattern circle {
  fill: var(--ink-2);
  stroke: none;
}
#h-travel *,
#mh-travel *,
#h-parking *,
#mh-parking * {
  stroke: var(--ink-2);
}
.k-sidewalk {
  fill: var(--k-sidewalk);
}
.k-planting {
  fill: var(--k-planting);
}
.k-bike {
  fill: var(--k-bike);
}
.k-travel {
  fill: var(--k-travel);
}
.k-bus {
  fill: var(--k-bus);
}
.k-parking {
  fill: var(--k-parking);
}
.k-median {
  fill: var(--k-median);
}
.k-loading {
  fill: var(--k-loading);
}
.k-buffer {
  fill: var(--k-buffer);
}
.k-shoulder {
  fill: var(--k-shoulder);
}
.k-bikerack {
  fill: var(--k-bikerack);
}
.k-bikeshare {
  fill: var(--k-bikeshare);
}
.k-pole {
  fill: var(--k-pole);
}
.k-busshelter {
  fill: var(--k-busshelter);
}
.k-busstation {
  fill: var(--k-busstation);
}
.k-bench {
  fill: var(--k-bench);
}
.k-terrace {
  fill: var(--k-terrace);
}
.k-streetlamp {
  fill: var(--k-streetlamp);
}
#drawing .slab-p,
.swatch .slab-p {
  fill: var(--ink-2);
  stroke: none;
  font-family: var(--font);
  font-weight: 700;
  pointer-events: none;
}
#drawing .badge {
  fill: var(--panel);
  stroke: var(--ink-2);
  stroke-width: 1.4;
  pointer-events: none;
}

/* The plan of a junction. */
#drawing .iso-flat,
#drawing .iso-top,
#drawing .iso-side {
  stroke: var(--ink);
  stroke-width: 0.6;
  stroke-opacity: 1;
  stroke-linejoin: round;
}
/* A zebra's stripes and a stop line are pavement paint, as the street's markings are: the white of --iso-paint-white
   with its 0.5 px dark edge (--iso-paint-edge), 3:1 on every material in both themes (shared/contrast.rs). */
#drawing .iso-zebra,
#drawing .iso-stopline {
  fill: var(--iso-paint-white);
  stroke: var(--iso-paint-edge);
  stroke-width: 0.5px;
  stroke-linejoin: round;
}
@media (forced-colors: active) {
  #drawing .iso-zebra,
  #drawing .iso-stopline {
    fill: CanvasText;
    stroke: none;
  }
}
#drawing .iso-post {
  stroke: var(--ink-2);
  stroke-width: 1.4;
  stroke-linecap: round;
}
#drawing .iso-head {
  fill: var(--ink);
  stroke: var(--panel);
  stroke-width: 1;
}
#drawing .iso-ramp {
  stroke: var(--ink-2);
  stroke-width: 0.6;
  stroke-opacity: 0.55;
}
/* The junction in 2.5D is pressed to select (junction/view/iso/ `hit_attrs`): a shape with a data-role selects what the
   keys would, and everything else is looked at and lets the press through to what lies under it. A tap is the whole
   gesture, so the targets ask for no double-tap zoom; the 2.5D has no grips, so nothing here is dragged. */
#drawing .iso-junction * {
  pointer-events: none;
}
#drawing .iso-junction [data-role],
#drawing .iso-junction [data-role] * {
  pointer-events: auto;
}
#drawing .iso-junction [data-role] {
  cursor: pointer;
  touch-action: manipulation;
}
/* A place to press that is narrower than a finger carries a stroke-width (junction/view/iso/mod.rs `target_growth_px`) that
   brings it to 24 px; the stroke is not painted, but a press lands on it. */
#drawing .iso-junction .iso-hit {
  fill: transparent;
  stroke: transparent;
  stroke-linejoin: round;
}
#drawing .iso-junction .lane-hit {
  stroke: transparent;
  stroke-linejoin: round;
}
/* The two buttons under the junction's drawing that step through its parts, as the arrow keys do. */
.part-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-block: 6px;
}
/* What the plan draws on the ground and the 2.5D draws after it (junction/view/iso_marks.rs; #140): the marks keep the
   plan's own classes and so its colours (stop-*, mv, approach-mark, dim, measure-loop, dead-cap, lane-arrow, curb-line),
   and lie on a surface that can be anything from dark asphalt to pale concrete, so each line has a casing under it
   in the panel's colour (a dark one under a warning, which the panel's colour does not clear 3:1). */
#drawing .iso-junction .iso-casing {
  fill: none;
  stroke: var(--panel);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#drawing .iso-junction .iso-casing.warn {
  stroke: var(--iso-sel-casing);
}
#drawing .iso-junction .iso-queue {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-dasharray: 6 3;
}
#drawing .iso-junction .curb-use-bad {
  fill: none;
}
#drawing .iso-junction .stop-post circle {
  stroke: var(--panel);
  stroke-width: 1.5;
}
#drawing .iso-junction .stop-shelter {
  filter: drop-shadow(0 0 1px var(--panel)) drop-shadow(0 0 1px var(--panel));
}
@media (forced-colors: active) {
  #drawing .iso-junction .iso-sel {
    stroke: Highlight;
  }
  #drawing .iso-junction .iso-sel-casing,
  #drawing .iso-junction .iso-casing,
  #drawing .iso-junction .iso-casing.warn,
  #drawing .iso-junction .lane-arrow path.halo {
    stroke: Canvas;
  }
  #drawing .iso-junction .lane-arrow path:not(.halo),
  #drawing .iso-junction .mv,
  #drawing .iso-junction .iso-queue,
  #drawing .iso-junction .measure-loop,
  #drawing .iso-junction .dead-cap,
  #drawing .iso-junction .dim,
  #drawing .iso-junction .curb-line {
    stroke: CanvasText;
  }
  #drawing .iso-junction .lane-arrow.bad path:not(.halo),
  #drawing .iso-junction .mv.bad,
  #drawing .iso-junction .dim-warn,
  #drawing .iso-junction .curb-line.bad {
    stroke: Mark;
  }
  #drawing .iso-junction .stop-post circle {
    stroke: Canvas;
  }
}
#drawing .approach-mark {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  pointer-events: none;
}
#drawing .stop-pad,
#drawing .stop-dwell {
  fill: var(--accent-wash);
  stroke: var(--accent);
  stroke-width: 1.5;
  pointer-events: none;
}
#drawing .stop-pad.stop-bulb {
  stroke-width: 2.5;
}
#drawing .stop-pad.stop-island {
  fill: none;
  stroke-dasharray: 1 3;
  stroke-linecap: round;
}
#drawing .stop-pad.stop-bad,
#drawing .stop-dwell.stop-bad {
  stroke-width: 3;
  stroke-dasharray: 5 3;
}
#drawing .stop-pad.stop-island.stop-bad {
  stroke-dasharray: 1 3;
}
#drawing .curb-use {
  pointer-events: none;
}
#drawing .curb-use.curb-use-bad {
  stroke: var(--ink);
  stroke-width: 3;
  stroke-dasharray: 5 3;
}
#drawing .stop-run {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  pointer-events: none;
}
#drawing .stop-post {
  fill: var(--accent);
  pointer-events: none;
}
#drawing .stop-shelter {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  pointer-events: none;
}
@media (forced-colors: active) {
  #drawing .approach-mark {
    stroke: CanvasText;
  }
  #drawing .stop-pad,
  #drawing .stop-dwell {
    fill: none;
    stroke: Highlight;
  }
  #drawing .stop-pad.stop-bulb {
    stroke-width: 3;
  }
  #drawing .stop-run,
  #drawing .stop-shelter {
    stroke: Highlight;
  }
  #drawing .stop-post {
    fill: Highlight;
  }
  #drawing .curb-use.curb-use-bad {
    stroke: Highlight;
  }
}
#drawing .curb-line {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  pointer-events: none;
}
#drawing .curb-line.bad {
  stroke: var(--warn-line);
  stroke-width: 3;
}
#drawing .lane-arrow path {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: calc(var(--arrow, 36) * 0.07px);
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
#drawing .lane-arrow path.halo {
  stroke: var(--panel);
  stroke-width: calc(var(--arrow, 36) * 0.16px);
}
#drawing .lane-arrow.out path:not(.halo) {
  stroke: var(--ink-3);
  stroke-width: calc(var(--arrow, 36) * 0.075px);
}
#drawing .lane-arrow.bad path:not(.halo) {
  stroke: var(--warn-line);
  stroke-width: calc(var(--arrow, 36) * 0.09px);
}
/* The one-way arrow on a slab: 28 px tall at the usual size, ringed in the page colour so it reads over the hatching. */
.dir,
.dir-halo {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.dir {
  stroke: var(--ink);
  stroke-width: 3;
}
.dir-halo {
  stroke: var(--panel);
  stroke-width: 7;
}
/* ---- the street in 2.5D (street/view/iso/) ---- */
.iso-ground {
  fill: var(--fill);
  stroke: none;
}
.iso-top,
.iso-front,
.iso-side,
.iso-curb {
  stroke: var(--ink-2);
  stroke-width: 1;
  stroke-linejoin: round;
}
/* Each face keeps its piece's tint; the faces turned from the eye are shaded darker by the drawing's own
   SVG filters (street/view/iso/raised.rs, `SHADES`). A curb is a light tone, not ink, so that a curb block on a narrow
   bike lane does not bury the lane. */
.iso-curb {
  fill: var(--iso-curb);
}
/* A top is the colour of its piece's material, over the kind's tint (`k-*`) that its faces keep. */
.iso-top.mat-asphalt,
.iso-flat.mat-asphalt,
.iso-ramp.mat-asphalt {
  fill: var(--mat-asphalt);
}
.iso-top.mat-concrete,
.iso-flat.mat-concrete,
.iso-ramp.mat-concrete {
  fill: var(--mat-concrete);
}
.iso-top.mat-permeable,
.iso-flat.mat-permeable,
.iso-ramp.mat-permeable {
  fill: var(--mat-permeable);
}
.iso-top.mat-brick,
.iso-flat.mat-brick,
.iso-ramp.mat-brick {
  fill: var(--mat-brick);
}
.iso-top.mat-grass,
.iso-flat.mat-grass,
.iso-ramp.mat-grass {
  fill: var(--mat-grass);
}
.iso-top.mat-planted,
.iso-flat.mat-planted,
.iso-ramp.mat-planted {
  fill: var(--mat-planted);
}
.iso-top.mat-gravel,
.iso-flat.mat-gravel,
.iso-ramp.mat-gravel {
  fill: var(--mat-gravel);
}
.iso-top.mat-trees,
.iso-flat.mat-trees,
.iso-ramp.mat-trees {
  fill: var(--mat-trees);
}
.iso-top.mat-rain_garden,
.iso-flat.mat-rain_garden {
  fill: var(--mat-rain_garden);
}
/* The 2.5D's textures (shared/iso/ground.rs) are drawn in the material's own colours (`--mat-*-line`, `-alt`), whatever the
   theme, and kept faint so that the paint, the symbols and the outlines read over them. */
.hatch[fill^="url(#iso-m-"] {
  opacity: 0.8;
  /* The texture is cut into bands along the street (street/view/iso/raised.rs): no anti-aliasing at a seam, where two
     partly covered edges would leave a faint line. */
  shape-rendering: crispEdges;
}
/* The joints of the 2.5D's textures that have regular ones (street/view/iso/joints.rs): lines in the material's own tones, as wide
   as ground.rs says (px), over the grain. */
.joints {
  fill: none;
  opacity: 0.8;
}
.joints.j-concrete {
  stroke: var(--mat-concrete-line);
  stroke-width: 1;
}
.joints.j-permeable {
  stroke: var(--mat-permeable-line);
  stroke-width: 0.8;
}
.joints.j-brick {
  stroke: var(--mat-brick-line);
  stroke-width: 0.8;
}
.joints.j-trees {
  stroke: var(--mat-trees-alt);
  stroke-width: 1;
}
/* A piece's colour is the same in both themes, so the selection outline needs a halo of the panel's colour to be seen
   on any of them. (The hover is the press target's tint, `.iso-hit-area:hover`, below.) */
.iso-solid {
  pointer-events: none;
}
/* The outline of a rain garden or a bioswale (street/view/iso/green.rs): a line inside the patch, over its fill. */
.iso-green-edge {
  fill: none;
  stroke: var(--iso-green-edge);
  stroke-width: 1.5;
  stroke-linejoin: round;
  pointer-events: none;
}
@media (forced-colors: active) {
  .iso-green-edge {
    stroke: CanvasText;
  }
}
.iso-solid polygon {
  stroke: var(--ink-2);
  stroke-width: 0.8;
  stroke-linejoin: round;
}
.s-crown {
  fill: var(--s-tree);
}
.s-trunk {
  fill: var(--k-bench);
}
.s-shelter {
  fill: var(--k-busshelter);
  fill-opacity: 0.75;
}
.s-post {
  fill: var(--ink-2);
}
/* Pavement paint (street/view/iso/paint.rs): flat shapes on the roadway with a 0.5 px edge (--iso-paint-edge) and no
   pointer events, so the piece under them is the one hovered (its hover outline is hidden where paint covers its
   edge). In forced colours it is drawn in the text colour. */
.iso-markings,
.iso-mark,
.iso-paint {
  pointer-events: none;
}
.iso-paint {
  stroke: var(--iso-paint-edge);
  stroke-width: 0.5px;
  stroke-linejoin: round;
}
.iso-paint.white {
  fill: var(--iso-paint-white);
}
.iso-paint.yellow {
  fill: var(--iso-paint-yellow);
}
@media (forced-colors: active) {
  .iso-paint.white,
  .iso-paint.yellow {
    fill: CanvasText;
    stroke: none;
  }
}
/* A sign's panel (street/view/iso/sign.rs): the stop sign's white panel, with no pointer events. */
.iso-stop-sign {
  pointer-events: none;
}
.iso-sign-panel {
  fill: var(--iso-sign-panel);
  stroke: var(--iso-sign-ink);
  stroke-width: 1px;
  stroke-linejoin: round;
}
/* The stop sign's bus (street/view/iso/stops.rs): the ink on the panel, its windows the panel's colour. */
.iso-sign-glyph {
  fill: var(--iso-sign-ink);
}
.iso-sign-glyph-cut {
  fill: var(--iso-sign-panel);
}
@media (forced-colors: active) {
  .iso-sign-glyph {
    fill: CanvasText;
  }
  .iso-sign-glyph-cut {
    fill: Canvas;
  }
  .iso-sign-panel {
    fill: Canvas;
    stroke: CanvasText;
  }
}
#drawing .iso .sel-box {
  filter: drop-shadow(0 0 1px var(--panel)) drop-shadow(0 0 1px var(--panel));
}
.iso-sel,
.iso-sel-casing {
  fill: none;
  stroke-linejoin: round;
  pointer-events: none;
}
.iso-sel-casing {
  stroke: var(--iso-sel-casing);
  stroke-width: 5.5;
}
.iso-sel {
  stroke: var(--iso-sel);
  stroke-width: 2.5;
}
/* The press targets (street/view/iso/scene/hits.rs): each piece's silhouette over the whole drawing, with no paint of its own.
   The stroke makes the target wider than the piece by 5 px a side, which is what lets a far, narrow piece be pressed;
   narrower pieces are drawn last, so they win where targets overlap. The hover and pressed states are a tint of the
   selection's blue with the selection's dark casing round it (a test in shared/contrast.rs reads the opacities). A tap selects and a drag scrolls the
   page: pan and pinch stay the browser's. */
#drawing.iso {
  touch-action: manipulation;
  /* The drawing is never narrower than 280 px (iso::MIN_WIDTH), so in a group narrower than that (a 280 px window,
     less the page's margins) it is scaled down whole by its viewBox, not cut off at the right. */
  max-width: 100%;
  height: auto;
}
.iso-hit-area {
  fill: var(--iso-sel);
  fill-opacity: 0;
  stroke: transparent;
  stroke-width: 10;
  stroke-linejoin: round;
  pointer-events: all;
  cursor: pointer;
}
.iso-hit-area:hover {
  fill-opacity: 0.3;
  stroke: var(--iso-sel-casing);
  stroke-opacity: 0.45;
}
.iso-hit-area:active {
  fill-opacity: 0.55;
  stroke: var(--iso-sel-casing);
  stroke-opacity: 0.75;
}
@media (forced-colors: active) {
  .iso-hit-area {
    fill: Highlight;
  }
}
/* The toggle between the section and the 2.5D, at the right of the street's name, on its line: the name's
   line has room to spare, while a row of its own (or the tools' row, which wraps it where text is wider, as
   with Linux's fonts) would push the drawing and the status line under it out of view at 1440 by 900. The
   title card is a grid for that: its name and the toggle share the first row, the line under the name spans
   both columns, and the toggle, 32 px tall, gives up 3 px above and below so the row stays the name's height. */
.title-card.with-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
}
.title-card.with-view > .street {
  display: contents;
}
.title-card.with-view #street-name {
  grid-area: 1 / 1;
}
.title-card.with-view .street-sub {
  grid-area: 2 / 1 / 3 / 3;
}
/* The previous and next arrows sit on a line of their own at the bottom of the card, under the line
   that names the street's ends, spanning both columns so the toggle's cell never takes them. */
.title-card.with-view .street-steps {
  grid-area: 3 / 1 / 4 / 3;
}
/* ---- the plan: the whole street from above, first end left (street/view/plan/) ---------- */

/* Each band is the colour of its piece's material, over the kind's tint (`k-*`), with a faint line between bands. */
.plan-band {
  stroke: var(--plan-mark-casing);
  stroke-opacity: 0.35;
  stroke-width: 0.5;
}
.plan-band.mat-asphalt {
  fill: var(--mat-asphalt);
}
.plan-band.mat-concrete {
  fill: var(--mat-concrete);
}
.plan-band.mat-permeable {
  fill: var(--mat-permeable);
}
.plan-band.mat-brick {
  fill: var(--mat-brick);
}
.plan-band.mat-grass {
  fill: var(--mat-grass);
}
.plan-band.mat-planted {
  fill: var(--mat-planted);
}
.plan-band.mat-gravel {
  fill: var(--mat-gravel);
}
.plan-band.mat-trees {
  fill: var(--mat-trees);
}
.plan-band.mat-rain_garden {
  fill: var(--mat-rain_garden);
}
/* The picked stretch: a tint over the bands, edged in two tones, a handle at each end. Every mark on the plan is a
   light line over a dark casing twice its width, so one of the two is 3:1 on any band and the panel; the fills only
   tint (shared/contrast.rs). */
.plan-pick-casing {
  fill: none;
  stroke: var(--plan-pick-casing);
  stroke-width: 4;
}
.plan-pick {
  fill: var(--plan-pick-edge);
  fill-opacity: 0.3;
  stroke: var(--plan-pick-edge);
  stroke-width: 2;
}
.plan-handle {
  fill: var(--plan-pick-casing);
  stroke: var(--plan-pick-edge);
  stroke-width: 1.5;
}
/* A boundary between runs, a cut end, a taper (dashed, over the bands it reaches) and a thing along the street. */
.plan-boundary-casing,
.plan-cut-casing,
.plan-taper-casing,
.plan-thing-casing {
  fill: none;
  stroke: var(--plan-mark-casing);
  stroke-width: 4;
}
.plan-boundary-line,
.plan-cut-line {
  fill: none;
  stroke: var(--plan-mark);
  stroke-width: 2;
}
.plan-taper {
  fill: var(--plan-mark);
  fill-opacity: 0.15;
  stroke: var(--plan-mark);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}
.plan-thing-mark {
  fill: var(--plan-mark);
  fill-opacity: 0.6;
  stroke: var(--plan-mark);
  stroke-width: 2;
}
/* The chosen thing is edged in the pick's two tones. */
.plan-chosen .plan-thing-casing {
  stroke: var(--plan-pick-casing);
  stroke-width: 4;
}
.plan-chosen .plan-thing-mark {
  stroke: var(--plan-pick-edge);
  stroke-width: 2;
}

/* The plan on the street page (street/view/plan/component.rs): the street's ends above it, the drawing in a box that
   scrolls sideways for a street too long to fit at the plan's smallest scale (never the page), the stretch picked under
   it. */
.plan-section {
  min-width: 0;
  max-width: 100%;
  padding: 4px 12px;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.plan-ends {
  display: flex;
  justify-content: space-between;
  margin: 0 0 2px;
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.plan-box {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  /* room for the point's focus ring at the plan's edges */
  padding: 4px 0;
}
.plan-canvas {
  position: relative;
  /* a sideways drag picks; the page still scrolls up and down over the plan */
  touch-action: pan-y;
  user-select: none;
  cursor: crosshair;
}
.plan-canvas[data-hover="edge"] {
  cursor: ew-resize;
}
.plan-canvas[data-hover="thing"] {
  cursor: grab;
}
.plan-svg svg {
  display: block;
}
/* The keyboard's point along the street: a target wide, a line in the pick's two tones down its middle, always seen; a
   ring shows when it has the focus. Presses go through it to the plan. */
#plan-point {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  margin-left: -12px;
  pointer-events: none;
  background:
    linear-gradient(var(--plan-pick-edge), var(--plan-pick-edge)) center / 2px 100% no-repeat,
    linear-gradient(var(--plan-pick-casing), var(--plan-pick-casing)) center / 6px 100% no-repeat;
}
#plan-point:focus-visible {
  outline: 2px solid var(--plan-pick-edge);
  outline-offset: -2px;
  box-shadow: inset 0 0 0 4px var(--plan-pick-casing);
}
.plan-picked {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 13px;
}
.plan-notice:empty {
  margin: 0;
}
.plan-notice {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 13px;
}
/* The rows of what stands along the street, under the plan: out of sight (the plan draws what they hold) until the
   keyboard is in one of them, then shown as they always were. */
.plan-rows {
  display: contents;
}
.plan-rows:not(:focus-within) {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- the rows along the street (curbside, stops, raised elements, green): a bar for the street's length, a cell per
   thing and per free stretch ---- */

@media (min-width: 900px) {
  .zone-caption {
    /* beside the strip, never taking more than its share: a long street name is cut with an ellipsis (the whole
       text is the caption's title); on a narrow window the caption sits above the strip and wraps */
    flex: 0 1 auto;
    min-width: 0;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
.zone-caption {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
}
.curb-strip,
.stop-strip,
.calming-strip,
.green-strip {
  flex: 1 1 14em;
  min-width: 0;
  display: flex;
  align-items: stretch;
  /* the cells keep 24 px each; when they do not fit the strip scrolls, never the page */
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  min-height: 40px;
  padding: 3px;
  border-radius: 6px;
}
.piece-list:focus-visible,
.curb-strip:focus-visible,
.stop-strip:focus-visible,
.calming-strip:focus-visible,
.green-strip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.curb-cell,
.stop-cell,
.calming-cell {
  flex: 1 1 0;
  /* the target size (WCAG 2.5.8): a short thing is still 24 px wide */
  min-width: 24px;
  display: flex;
  align-items: center;
  min-height: 34px;
  /* no padding on the cell: a flex item's base size is never under its padding and border, which would make the
     cells' widths not proportional to their lengths (the drag places a boundary by that proportion) */
  background: var(--zone-fill);
  color: var(--zone-ink);
  border: 1px solid var(--zone-edge);
  cursor: pointer;
  overflow: hidden;
}
.piece-list-section {
  min-width: 0;
  max-width: 100%;
  padding: 4px 12px;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.piece-list {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border-radius: 6px;
}
/* A cell is as wide as its words, a row of them wrapping at a narrow window; each is 24 px at least both ways
   (WCAG 2.5.8). The selected one has the rows' heavy outline, so it is not shown by colour alone. */
.piece-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  min-width: 24px;
  min-height: 34px;
  background: var(--zone-fill);
  color: var(--zone-ink);
  border: 1px solid var(--zone-edge);
  cursor: pointer;
}
.piece-width {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.piece-cell[aria-selected="true"],
.curb-cell[aria-selected="true"],
.stop-cell[aria-selected="true"],
.calming-cell[aria-selected="true"] {
  outline: 3px solid var(--zone-sel);
  outline-offset: -3px;
  font-weight: 600;
}
.stop-name,
.calming-name {
  min-width: 0;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
/* ---- the curbside strips, under the plan: a row for each side, a cell per use and per gap ---- */

.curb-strip-section {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.curb-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  min-width: 0;
}
/* a gap is a free stretch: it has no fill, a dotted edge; a use that fails a check has a heavier bottom edge (not
   by colour alone, WCAG 1.4.1) */
.curb-cell.gap,
.stop-cell.gap,
.calming-cell.gap {
  background: transparent;
  color: var(--ink);
  border-style: dotted;
}
.curb-cell.failing,
.stop-cell.failing,
.calming-cell.failing {
  border-bottom-width: 5px;
}
/* ---- the Green row: a bar for the street's length, a cell for each tree and planting laid along it, on a line of its
   own when it lies beside another across the street (24 px a line, two lines before the row scrolls) ---- */
/* the box of the other strips (above); its cells lie on lines of 24 px, two before it scrolls */
.green-strip {
  position: relative;
  display: block;
  box-sizing: border-box;
  height: calc(var(--tracks, 1) * 24px + 8px);
  /* the other strips show the street's length with their free cells; this one has none, so it draws its own edge */
  border: 1px dotted var(--zone-edge);
  overflow-x: hidden;
  overflow-y: auto;
}
.green-cell {
  position: absolute;
  box-sizing: border-box;
  /* the target size (WCAG 2.5.8): each cell is 24 px high and at least 24 px wide, on a line of its own */
  height: 24px;
  min-width: 24px;
  display: flex;
  align-items: center;
  background: var(--zone-fill);
  color: var(--zone-ink);
  border: 1px solid var(--zone-edge);
  cursor: pointer;
  overflow: hidden;
}
.green-cell[aria-selected="true"] {
  outline: 3px solid var(--zone-sel);
  outline-offset: -3px;
  font-weight: 600;
}
/* a tree or planting that fails a check has a heavier bottom edge (not by colour alone, WCAG 1.4.1) */
.green-cell.failing {
  border-bottom-width: 5px;
}
.green-name {
  min-width: 0;
  padding: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
@media (forced-colors: active) {
  .green-cell {
    border-color: CanvasText;
  }
  .green-cell[aria-selected="true"] {
    outline-color: Highlight;
  }
}
.speed-limit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin-bottom: 10px;
}
.speed-limit label {
  color: var(--ink-2);
  font-size: 13px;
}
.speed-limit select {
  min-height: 32px;
  min-width: 0;
}
.zone-tools {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}
.zone-tool {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 6px;
}
.zone-tool label {
  flex-basis: 100%;
  color: var(--ink-2);
  font-size: 13px;
}
.zone-tool input {
  min-height: 32px;
  min-width: 0;
  flex: 1 1 6em;
}
/* a checkbox with its label beside it, the box a 24 px target (WCAG 2.5.8) */
.zone-tool.zone-check {
  flex-wrap: nowrap;
  align-items: center;
}
.zone-tool.zone-check input {
  flex: none;
  width: 24px;
  height: 24px;
  min-height: 24px;
}
.zone-tool.zone-check label {
  flex: 1 1 auto;
  color: var(--ink);
  font-size: 14px;
}
.zone-tools button {
  min-height: 32px;
}
.zone-tools button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}
/* The rows of a level of the details panel: one row per setting, a short label beside its control (the field's
   fuller name is its aria-label). */
.zone-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.zone-l {
  padding-top: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.zone-c {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.zone-c > input {
  min-height: 32px;
  min-width: 0;
}
/* A dialog's main action (the Transform dialog's Apply): the accent under its ink, also under the pointer; disabled,
   a plain button with ink-3 on the panel (pinned in shared/contrast.rs). */
.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.btn.primary:hover:not(:disabled) {
  background: var(--accent);
}
.btn.primary:disabled {
  border-color: var(--field-line);
  background: var(--panel);
  color: var(--ink-3);
}
.zone-hint {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
}
/* The details panel's Street level: the street's name and figures, then rows (speed limit, the standard in force,
   with "Manage profiles" a disclosure), and the tip for someone who has chosen nothing at its foot. */
.street-head .insp-sub {
  margin-top: 2px;
}
.speed-limit label.zone-l {
  color: var(--ink);
  font-size: 13px;
}
#p-street .zone-row {
  padding: 12px 0;
}
.standards-manage > summary,
.standards-import-open > summary,
.scenario-manage > summary {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.standards-manage[open] {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.street-tip {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--fill);
  color: var(--ink-2);
  font-size: 13px;
}
@media (forced-colors: active) {
  .curb-cell,
  .stop-cell,
  .calming-cell {
    border-color: CanvasText;
  }
  .curb-cell.gap,
  .stop-cell.gap,
  .calming-cell.gap {
    border-style: dotted;
  }
  .curb-cell.failing,
  .stop-cell.failing,
  .calming-cell.failing {
    border-bottom-width: 5px;
  }
  .curb-cell[aria-selected="true"],
  .stop-cell[aria-selected="true"],
  .calming-cell[aria-selected="true"] {
    outline-color: Highlight;
  }
}
#drawing .mv {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
#drawing .mv.no {
  stroke: var(--ink-3);
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
}
#drawing .mv.bad {
  stroke: var(--warn-line);
}
#drawing .mv.indirect {
  stroke-dasharray: 8 4;
}
#drawing .lane-hit {
  fill: transparent;
  cursor: pointer;
}
#drawing .lane-hit:hover,
#drawing .lane-hit.on {
  fill: var(--accent-wash);
}
#drawing .measure-tag {
  font-size: 13px;
  font-weight: 600;
}
#drawing .measure-loop {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.6;
  stroke-dasharray: 3 2;
  pointer-events: none;
}
#drawing .bollard {
  fill: var(--ink-2);
  stroke: var(--panel);
  stroke-width: 1;
  pointer-events: none;
}
#drawing .dead-cap {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 5;
  stroke-linecap: butt;
  pointer-events: none;
}

/* ---- legend, swatches ------------------------------------------------------- */

.swatch {
  display: block;
  width: 44px;
  height: 22px;
  border: 1px solid var(--field-line);
  border-radius: 6px;
  background: var(--panel);
}
.swatch .k-sidewalk,
.swatch .k-planting,
.swatch .k-bike,
.swatch .k-travel,
.swatch .k-bus,
.swatch .k-parking,
.swatch .k-median,
.swatch .k-loading,
.swatch .k-buffer,
.swatch .k-shoulder,
.swatch .k-bikerack,
.swatch .k-bikeshare,
.swatch .k-pole,
.swatch .k-busshelter,
.swatch .k-busstation,
.swatch .k-bench,
.swatch .k-terrace,
.swatch .k-streetlamp {
  stroke: none;
}
/* The map hides the texture in its key; here a surface is told apart by it. */
.swatch rect[fill^="url"] {
  display: inline;
}
.swatch.none line {
  stroke: var(--ink-3);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}
.swatch.none path,
.swatch.none rect,
.swatch.none circle {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.swatch.none .dash {
  stroke-dasharray: 3 3;
  stroke: var(--ink-3);
}
.plan-key {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 8px 18px;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}
.plan-key li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.plan-key .swatch {
  width: 26px;
  height: 13px;
}
.mc {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 8px;
  border-radius: 3px;
  vertical-align: -1px;
}
.mc-foot {
  background: var(--k-sidewalk);
}
.mc-bike {
  background: var(--k-bike);
}
.mc-transit {
  background: var(--k-bus);
}
.mc-vehicle {
  background: var(--k-travel);
  box-shadow: inset 0 0 0 1px var(--field-line);
}
.mc-neutral {
  background: var(--k-buffer);
  box-shadow: inset 0 0 0 1px var(--field-line);
}
.mc-green {
  background: var(--k-planting);
}

/* ---- the inspector ----------------------------------------------------------- */

.inspector {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
/* The transit priority section follows the inspector in the same scroller. */
.inspector + section {
  margin-top: 18px;
}
.insp-empty {
  margin: 0;
  color: var(--ink-2);
  text-wrap: pretty;
}
.insp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
}
.insp-name {
  margin: 0;
  display: block;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
}
.insp-sub {
  margin: 3px 0 0;
  display: block;
  color: var(--ink-2);
  font-size: 14px;
}
.insp-sec .note-h {
  margin: 0 0 8px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.insp-sec > .btn {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
}
.insp-sec > .btn + .insp-range {
  margin-top: 8px;
}
.insp-range {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}
.wfield {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wfield input,
.var input[type="time"],
.var select,
.inspector select,
#signal-plans input[type="text"],
#signal-plans input[type="time"] {
  min-height: 36px;
  padding: 2px 10px;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.wfield input {
  width: 72px;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wfield input:focus,
.var select:focus,
.var input[type="time"]:focus,
.inspector select:focus,
#signal-plans input[type="text"]:focus,
#signal-plans input[type="time"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.wfield input:invalid {
  border-color: var(--warn-line);
  color: var(--warn);
}
/* A field inside a page's locked controls: its value still read in ink-2, its frame faint, no text cursor. */
.wfield input:disabled,
.var select:disabled,
.var input[type="time"]:disabled,
.inspector select:disabled {
  border-color: var(--rule);
  background: transparent;
  color: var(--ink-2);
  cursor: default;
}
.inspector select {
  width: 100%;
}
.unit-tag {
  min-width: 18px;
  color: var(--ink-2);
  font-size: 13px;
}
.stepper {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 6px;
}
.stepper .ico {
  width: 40px;
  height: 40px;
}
.stepper .wfield {
  display: flex;
  gap: 4px;
  min-width: 0;
}
.stepper .wfield input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}
.stepper .unit-tag {
  font-size: 14px;
}
.ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color 120ms var(--ease-out),
    border-color 120ms var(--ease-out);
}
.ico svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--fill);
}
.ico:disabled,
.ico[aria-disabled="true"] {
  border-color: var(--rule);
  color: var(--ink-3);
  cursor: not-allowed;
}
.ico.danger:hover:not(:disabled),
.btn.danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--panel);
}
.opts {
  margin: 0;
  padding: 0;
  list-style: none;
}
.opt {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 5px 8px 5px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms var(--ease-out);
}
.opt:hover {
  background: var(--fill);
}
.opt[aria-checked="true"] {
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 600;
}
.opt .tick {
  width: 14px;
  height: 14px;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}
.opt[aria-checked="true"] .tick {
  opacity: 1;
}
.opt[role="checkbox"],
.opt[role="radio"] {
  grid-template-columns: minmax(0, 1fr) 16px;
  padding-left: 8px;
}
/* A choice drawn with a swatch (a surface, a curb) keeps the swatch's column: its name is in the middle one. */
.opt[role="radio"]:has(.swatch) {
  grid-template-columns: 44px minmax(0, 1fr) 16px;
  padding-left: 4px;
}
.opt[role="checkbox"]:has(.turn-ico) {
  grid-template-columns: 26px minmax(0, 1fr) 16px;
  padding-left: 4px;
}
.opt[role="checkbox"]:disabled {
  color: var(--ink-3);
  cursor: default;
}
.opt[role="checkbox"]:disabled:hover {
  background: transparent;
}
.opt[role="radio"][aria-disabled="true"] {
  cursor: default;
}
/* Inside a page's locked controls (`shared::locked`, a disabled fieldset on a page shown read-only) a choice is greyed:
   ink-3, the chosen one ink-2 with its tick and no wash, no pointer and no hover fill (pinned in shared/contrast.rs). */
.opt[role="radio"]:disabled {
  color: var(--ink-3);
  cursor: default;
}
.opt[role="radio"]:disabled:hover {
  background: transparent;
}
.opt[role="checkbox"][aria-checked="true"]:disabled,
.opt[role="radio"][aria-checked="true"]:disabled {
  background: transparent;
  color: var(--ink-2);
}
.opt .turn-ico {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vars {
  display: grid;
  gap: 8px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
.var {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: var(--fill);
}
.var.now {
  background: var(--accent-wash);
}
.var select,
.var input[type="time"] {
  min-height: 40px;
  font-size: 14px;
}
.var select[data-ivdir] {
  grid-column: 1 / -1;
}
.var-times {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.var-days {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--ink-2);
}
.var-times input {
  width: 0;
  flex: 1;
  min-width: 0;
}
.var .ico {
  grid-column: 2;
  grid-row: 1;
}
.insp-sec .btn[data-ivadd] {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
}
/* The street page's piece pane: Move and Remove under the name, then one row per setting, its name in a column on the
   left and the control on the right, with the width's place in its range drawn under the field, and the choices of a
   surface, a direction or a curb as tiles, three across (`.insp-columns`, which the junction's levels share but for its
   signal plan, CLM-51). */
.insp-actions {
  display: flex;
  gap: 6px;
}
.insp-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
  min-height: 34px;
  padding: 0 8px;
  font-size: 13px;
  white-space: nowrap;
}
.insp-actions .btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.insp-actions .btn.danger {
  flex: 0 0 auto;
  color: var(--danger);
}
.insp-actions .btn.danger:disabled {
  color: var(--ink-3);
}
.insp-meter-track {
  display: block;
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--fill);
}
.insp-meter {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
}
.insp-columns {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.insp-columns .insp-head {
  margin-bottom: 10px;
}
.insp-columns .insp-actions {
  margin-bottom: 4px;
}
.insp-columns .insp-sec {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.insp-columns .insp-sec > * {
  grid-column: 2;
  min-width: 0;
}
.insp-columns .insp-sec > .note-h {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding: 7px 0 0;
  border: 0;
  font-size: 13px;
}
.insp-columns .insp-sec > .insp-range {
  margin: 0;
  font-size: 12px;
}
.insp-columns .insp-sec > .btn {
  justify-self: start;
  width: auto;
  min-height: 32px;
  font-size: 13px;
}
/* A section whose body is a list, too wide for the control column: its name above it, the list across both columns. */
.insp-columns .insp-sec.insp-span > * {
  grid-column: 1 / -1;
}
.insp-columns .insp-sec.insp-span > .note-h {
  grid-row: auto;
  padding: 0 0 2px;
}
.insp-columns .vars:empty {
  display: none;
}
.insp-columns .insp-sec > .opts[role="radiogroup"] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.insp-columns .insp-sec > .opts[role="radiogroup"] .opt[role="radio"] {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 4px;
  height: 100%;
  padding: 6px 4px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}
.insp-columns .insp-sec > .opts[role="radiogroup"] .opt[role="radio"][aria-checked="true"] {
  padding: 5px 3px;
  border: 2px solid var(--accent);
}
.insp-columns .insp-sec > .opts[role="radiogroup"] .opt[role="radio"] .tick {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 12px;
  height: 12px;
}
.insp-columns .insp-sec > .opts[role="radiogroup"] .opt[role="radio"] .swatch {
  width: 100%;
  max-width: 64px;
  height: 20px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: 15px;
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.fld {
  display: block;
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}
.fld span {
  display: block;
  margin-bottom: 3px;
}
.problems {
  margin: 8px 0 0;
  padding: 0 0 0 16px;
  color: var(--warn);
  font-size: 14px;
}
.lanes {
  margin: 0;
  padding: 0;
  list-style: none;
}
.lane-row {
  display: block;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  font-size: 15px;
}
.lane-row:first-child {
  border-top: 0;
}
.lane-row small {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
}
.lane-row.bad span:first-child {
  color: var(--warn);
  font-weight: 600;
}
.lane-row .turns-btns {
  flex-wrap: wrap;
  margin-top: 6px;
}
.lane-pick {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lane-pick:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.turns-btns {
  display: flex;
  gap: 4px;
}
.turn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  transition:
    background-color 120ms var(--ease-out),
    color 120ms var(--ease-out);
}
.turn:hover:not(:disabled):not([aria-pressed="true"]) {
  background: var(--fill);
}
.turn .turn-ico {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.turn[aria-pressed="true"] {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--accent);
}
.turn:disabled {
  border-color: var(--rule);
  color: var(--ink-3);
  cursor: default;
}
.turn[aria-pressed="false"]:not(:disabled)::after,
.turn.read-only[aria-pressed="false"]::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 0.8px),
    var(--ink-3) calc(50% - 0.8px) calc(50% + 0.8px),
    transparent calc(50% + 0.8px)
  );
  pointer-events: none;
}
.turn.bad {
  border-color: var(--warn-line);
  color: var(--warn);
}
.turn.bad[aria-pressed="true"],
.turn.read-only.bad[aria-pressed="true"] {
  border-color: var(--warn-line);
  background: var(--warn-wash);
  color: var(--warn);
}
.turn.locked {
  border-style: dashed;
  border-color: var(--field-line);
  color: var(--ink-3);
  opacity: 0.7;
}
/* A turn on a page shown read-only (`read-only`, set by the junction's views; it sits outside the locked fieldsets):
   allowed ones on the fill in ink-2, unserved ones keep their warning (with `.turn.bad`'s), banned ones their stroke (pinned in
   shared/contrast.rs). A turn an editable page disables (a street the lane cannot reach) keeps its own look. */
.turn.read-only[aria-pressed="true"] {
  border-color: var(--rule);
  background: var(--fill);
  color: var(--ink-2);
}
.turn.dest {
  width: auto;
  min-width: 52px;
  gap: 3px;
  padding: 0 8px;
  grid-auto-flow: column;
  font-size: 13px;
  font-weight: 600;
}
.turn.dest .turn-ico {
  width: 14px;
  height: 14px;
}
.turn.dest[aria-pressed="false"]:not(:disabled)::after,
.turn.dest.read-only[aria-pressed="false"]::after {
  inset: 5px 4px;
}

/* ---- the street page's details panel: the path to the level shown --------- */

/* A header of the panel above its scrolling body, where a sidebar's tab strip sits, so it never scrolls away. */
/* The junction's details: its streets to go to, one button each, the compass beside the name; the tip for someone who
   has chosen nothing at the foot. The path above is the street page's (.panel-path). */
.jn-goes {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.jn-goes .btn,
.btn.jn-go {
  justify-content: flex-start;
  width: 100%;
  min-height: 32px;
  gap: 8px;
  font-size: 13px;
  text-align: left;
}
.btn.jn-go::after {
  content: "›" / "";
  margin-left: auto;
  color: var(--ink-3);
}
.jn-goes .btn b {
  min-width: 2em;
  color: var(--ink-2);
}
/* The junction's levels in the street's label column (`.insp-columns`, CLM-51). Its settings have longer names than a
   piece's, so the column is a little wider and a name breaks rather than run into its control; a name of several lines
   takes the last row's room, so what is said under a control stays right under it. */
#inspector > .insp-columns {
  container: junction-details / inline-size;
}
#inspector > .insp-columns .insp-sec:not(.insp-span) {
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-rows: repeat(5, min-content) 1fr;
  row-gap: 0;
}
#inspector > .insp-columns .insp-sec:not(.insp-span) > .note-h {
  grid-row: 1 / span 6;
  overflow-wrap: break-word;
}
#inspector > .insp-columns .insp-sec > :not(.note-h) + * {
  margin-top: 4px;
}
#inspector > .insp-columns > p:not(.jn-tip) {
  padding: 10px 0;
}
#inspector > .insp-columns .insp-sec > .btn,
#inspector > .insp-columns .insp-actions .btn {
  max-width: 100%;
  padding-block: 4px;
  text-align: center;
  white-space: normal;
}
#inspector > .insp-columns .insp-sec > .btn.jn-go {
  justify-self: stretch;
  width: 100%;
  text-align: left;
}
#inspector > .insp-columns .jn-fold > summary + .insp-sec,
#inspector > .insp-columns .jn-fold > summary + .read-only-controls > .insp-sec:first-child {
  padding-top: 0;
  border-top: 0;
}
/* A long unit ("m across") goes under its number, which keeps room to be read in any font. */
#inspector > .insp-columns .stepper .wfield {
  flex-wrap: wrap;
  justify-content: center;
}
#inspector > .insp-columns .stepper .wfield input {
  flex: 1 1 64px;
  min-width: 64px;
  padding-inline: 4px;
}
#inspector > .insp-columns .stepper .unit-long {
  flex-basis: 100%;
  text-align: center;
}
/* A tile's tick has the corner to itself: a layout's name is words alone, with no picture above it. */
#inspector > .insp-columns .insp-sec > .opts[role="radiogroup"] .opt[role="radio"] {
  padding-top: 17px;
  overflow-wrap: anywhere;
}
#inspector > .insp-columns .insp-sec > .opts[role="radiogroup"] .opt[role="radio"][aria-checked="true"] {
  padding-top: 16px;
}
@media (any-pointer: coarse) {
  #inspector > .insp-columns .insp-actions .btn,
  #inspector > .insp-columns .insp-sec .btn {
    min-height: 44px;
  }
}
/* On a phone there is no room beside a name: it goes above its control. */
@container junction-details (max-width: 270px) {
  #inspector > .insp-columns select {
    padding-inline: 6px;
    font-size: 13px;
  }
  #inspector > .insp-columns .insp-sec:not(.insp-span) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }
  #inspector > .insp-columns .insp-sec:not(.insp-span) > * {
    grid-column: 1;
  }
  #inspector > .insp-columns .insp-sec:not(.insp-span) > .note-h {
    grid-row: auto;
    padding: 0 0 4px;
  }
}
/* A street's rarely set parts, folded, with what is set beside the name, an h3 in the summary (`fold` in the junction's inspector). */
.jn-fold {
  border-top: 1px solid var(--rule);
}
.jn-fold > summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0;
  cursor: pointer;
}
.jn-fold-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.jn-fold-set {
  margin-left: auto;
  color: var(--ink-2);
  font-size: 12px;
  text-align: right;
}
/* A signal option's warnings, beside what it has set (CLM-49): a closed fold never hides a problem. */
.jn-fold-warn {
  color: var(--warn);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.jn-fold[open] > summary {
  padding-bottom: 6px;
}
/* The junction's signal cycle as one bar: each phase's green, yellow and all-red, to scale. */
.jn-cycle-bar {
  display: flex;
  gap: 1px;
  height: 12px;
  margin-bottom: 4px;
  overflow: hidden;
  border-radius: 4px;
}
.jn-cycle-bar .g {
  background: var(--ok);
}
.jn-cycle-bar .a {
  background: var(--warn-line);
}
.jn-cycle-bar .r {
  background: var(--danger);
}
.jn-tip {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--fill);
  color: var(--ink-2);
  font-size: 13px;
}
#p-street > .hint {
  margin: 0 0 8px;
}

/* ---- notes ------------------------------------------------------------------- */

.notes .tabs {
  margin: 0 0 4px;
}
.tab-n {
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--warn-wash);
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
}
.sample {
  margin-left: 6px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
}
.nt {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.nt th {
  padding: 2px 0 6px 8px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.nt th:first-child {
  padding-left: 0;
  text-align: left;
}
.nt td {
  padding: 6px 0 6px 8px;
  border-top: 1px solid var(--rule);
  text-align: right;
}
.nt td:first-child {
  padding-left: 0;
  text-align: left;
  font-weight: 500;
}
.nt .up,
.nt .down {
  color: var(--ink);
  font-weight: 600;
}
.nt .zero,
.nt td.self {
  color: var(--ink-3);
}
.nt td.bad {
  color: var(--warn);
  font-weight: 600;
}
.nt th[scope="row"] {
  padding: 6px 6px 6px 0;
  font-weight: 500;
  text-align: left;
  color: var(--ink);
  font-size: 14px;
}
.nt tr.total th,
.nt tr.total td {
  border-top: 2px solid var(--ink-3);
  font-weight: 600;
}
.nt .turn {
  width: 30px;
  height: 26px;
  vertical-align: middle;
}
.turns td,
.turns th {
  text-align: center;
}
.turns th[scope="row"] {
  text-align: left;
}
.dirtag {
  display: inline-block;
  min-width: 28px;
  margin-right: 4px;
  color: var(--ink-2);
  font-weight: 600;
}
/* The Impact tab's card: what the last change did to the space and the checks (#64). The verdict is a sentence that
   names its result, so its colour only adds to the words; its bar is the colour of its text (3:1 on the panel). */
.impact {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.impact-what,
.impact-none,
.impact-class,
.impact-verdict,
.impact-uses li {
  padding: 2px 8px;
  font-size: 14px;
}
.impact-what {
  color: var(--ink);
  font-weight: 600;
}
.impact-none,
.impact-class {
  color: var(--ink-2);
}
.impact-sub {
  padding: 8px 8px 2px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}
.impact-uses {
  margin: 0;
  padding: 0;
  list-style: none;
}
.impact-checks li {
  padding-block: 4px;
}
.impact-verdict {
  margin: 0 8px 2px;
  color: var(--ink-2);
  font-weight: 600;
}
.impact-verdict.improved {
  color: var(--ok);
}
.impact-verdict.regressed {
  color: var(--warn);
}
.impact-verdict.mixed {
  color: var(--ink);
}
@media (forced-colors: active) {
  .impact-verdict,
  .impact-verdict.improved,
  .impact-verdict.regressed,
  .impact-verdict.mixed {
    color: CanvasText;
  }
}
/* The Impact tab: one band of three parts side by side (the last change, the width, the people moved), stacked where
   the panel is narrow (the junction's sidebar, a phone). The bars and the figure are drawings of the two tables, which
   are hidden but read. */
#p-space {
  container-type: inline-size;
}
.impact-band {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.5fr) minmax(0, 0.8fr);
}
.impact-band > section {
  min-width: 0;
  padding: 0 18px;
  border-left: 1px solid var(--rule);
}
.impact-band > section:first-child {
  padding-left: 0;
  border-left: 0;
}
.impact-band > section:last-child {
  padding-right: 0;
}
.impact-band .impact {
  padding-bottom: 0;
  border-bottom: 0;
}
@container (max-width: 700px) {
  .impact-band {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .impact-band > section {
    padding: 12px 0 0;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }
  .impact-band > section:first-child {
    padding-top: 0;
    border-top: 0;
  }
}
/* In the band the card's sub-headings ("Street space", "Newly failing") are read, not shown: the marks and the verdict
   above say what each list is, and the card keeps to the tray's height. */
.impact-band .impact-sub {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.impact-band .impact-checks li {
  padding-block: 2px;
}
.space-bars .bars {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 5px 8px;
  align-items: center;
  color: var(--ink-2);
  font-size: 12px;
}
.space-bars .space-bar {
  display: flex;
  gap: 1px;
  height: 18px;
  overflow: hidden;
  border-radius: 5px;
}
.space-bars .seg {
  display: block;
  min-width: 2px;
}
.space-bars .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 12px;
}
.space-bars .legend .mc {
  margin-right: 5px;
}
.space-bars .legend b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.space-bars .legend .up,
.space-bars .legend .down,
.cap-from.up,
.cap-from.down {
  color: var(--ink);
  font-weight: 700;
}
.cap-big {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cap-from {
  margin: 2px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}
.revs {
  min-height: 0;
}
/* The Checks tab: the checks, what fails first, and beside them a column for the goal and its measures, which drops
   under the list where there is no room for both (the junction's sidebar, a phone). The passing checks are folded
   under a button until asked for. */
.checks-split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 28px;
}
.checks-main {
  flex: 1.7 1 360px;
  min-width: 0;
}
.checks-side {
  display: grid;
  flex: 1 1 220px;
  gap: 10px;
  min-width: 0;
}
/* A folded passing check: the rows are grids, which would otherwise win over the `hidden` attribute. */
.checks li[hidden] {
  display: none;
}
.checks-all-pass {
  margin: 4px 0;
  color: var(--ok);
  font-weight: 600;
}
.checks-passing {
  min-height: 32px;
  margin-top: 6px;
  padding: 4px 12px;
  border: 1px solid var(--rule);
  border-radius: 99px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.checks-passing:hover {
  background: var(--fill);
  color: var(--ink);
}
.checks-passing:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* The changes: a card per change, the newest first, as many across as the width holds (several in the street's tray,
   one in the junction's sidebar). The street or junction as it is now is the current step: washed, with a border twice
   as thick, so it does not rest on colour alone; the street or junction today is the last card, its border dashed. */
.rev-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rev-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.rev-step {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}
.rev-what {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.rev-card.now {
  padding: 7px 11px;
  border: 2px solid var(--accent);
  background: var(--accent-wash);
}
.rev-card.now .rev-step {
  color: var(--ink-2);
}
.rev-card.base {
  border-style: dashed;
  color: var(--ink-2);
}
.fine {
  padding: 8px 0 0;
  color: var(--ink-3);
  font-size: 13px;
}
.checks li {
  grid-template-columns: 22px minmax(0, 1fr);
}
/* The title block: the street's or junction's name, its figures, then where it came from (whether it was edited since
   it was imported, and the OpenStreetMap ways or nodes), each a label over its value, in one row while there is room. */
.title-block {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 22px;
  padding: 12px 20px 14px;
  border-top: 1px solid var(--rule);
}
.title-block .tb-cell:first-child {
  flex: 1 1 10em;
  min-width: 0;
}
.title-block .tb-src {
  flex: 1 1 14em;
  min-width: 0;
}
.title-block .tb-src b {
  font-size: 14px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

/* ---- the Add menu --------------------------------------------------------------- */

.add {
  position: relative;
}
.add > .btn {
  padding-inline: 18px;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.add > .btn:hover:not(:disabled),
.add > .btn[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent);
  filter: brightness(0.94);
}
/* Fixed to the window so the stage cannot clip it; the page script sets its place. */
.add-menu {
  position: fixed;
  right: auto;
  left: 8px;
  top: 8px;
  width: min(720px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow-y: auto;
}
.add-search {
  width: 100%;
  min-height: 40px;
  margin: 0 0 12px;
  padding: 0 12px;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.add-search::placeholder {
  color: var(--ink-3);
}
/* The topics beside the chosen topic's items (one row of tabs across the top on a narrow screen, below), or the
   search's results. */
.add-body {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0 16px;
  align-items: start;
}
#add-results,
.add-none {
  grid-column: 1 / -1;
}
.add-topics {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.add-topic {
  min-height: 32px;
  padding: 6px 12px 6px 9px;
  border: 0;
  border-inline-start: 3px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  text-align: start;
  white-space: nowrap;
  cursor: pointer;
}
.add-topic:hover {
  background: var(--fill);
}
/* The chosen topic: bold, filled and a bar on its leading edge, not colour alone (shared/contrast.rs). */
.add-topic[aria-selected="true"] {
  border-inline-start-color: var(--accent);
  background: var(--fill);
  color: var(--ink);
  font-weight: 700;
}
@media (forced-colors: active) {
  .add-topic {
    border-inline-start-color: Canvas;
  }
  .add-topic[aria-selected="true"] {
    border-inline-start-color: Highlight;
  }
}
.add-menu .hint {
  padding: 0 0 4px;
}
.add-panel .add-sub + .hint,
.add-panel .add-reason + .hint {
  margin-top: 12px;
}
.add-sub {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.add-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  padding: 5px 8px 5px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
/* Every name in the second column, whether or not the item has an icon; in the search's results its topic under it. */
.add-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
}
.add-icon,
.add-icon .icon {
  display: block;
  width: 88px;
  height: 70px;
}
.add-icon .icon {
  border-radius: 8px;
  background: var(--fill);
}
.add-item:hover {
  background: var(--fill);
}
.add-item b {
  grid-column: 2;
  font-size: 15px;
  font-weight: 600;
}
.add-topic-name {
  grid-column: 2;
  color: var(--ink-2);
  font-size: 13px;
}
.add-item .dw {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: var(--ink-2);
  font-size: 14px;
}
/* An item the street cannot take stays listed, dimmed, with the reason as text under its run (ink-2 on the panel,
   measured in shared/contrast.rs). */
.add-item[aria-disabled="true"] {
  color: var(--ink-2);
  cursor: not-allowed;
}
.add-item[aria-disabled="true"]:hover {
  background: transparent;
}
.add-reason {
  margin: 0;
  padding: 2px 8px 4px;
  color: var(--ink-2);
  font-size: 14px;
}
.add-none {
  margin: 0;
  padding: 8px 4px;
  color: var(--ink-2);
}
/* As narrow as menu_box makes the menu on a phone: the topics are one row of tabs across the top, scrolling sideways
   (the page sets the tablist's aria-orientation to match: street/view/add_menu.rs). */
@media (max-width: 560px) {
  .add-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .add-topics {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .add-topic {
    flex: none;
  }
}

/* ---- the Transform dialog ------------------------------------------------- */

/* A modal <dialog> (street/view/transform.rs): the groups, the open group's choices and the preview side by side,
   Cancel and Apply under them; one column under 720 px, the list capped there so the preview under it stays near. It keeps one height at every width, so that the options do not
   move under the pointer when pointing at one shows its preview and the dialog, centred by the browser, would grow. Its text pairs are measured in shared/contrast.rs. */
.transform-dialog {
  width: min(960px, 100vw - 32px);
  max-width: min(960px, 100vw - 32px);
  height: min(720px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.transform-dialog[open] {
  display: flex;
  flex-direction: column;
}
/* The page behind is dimmed by the shadows' own slate, so the dialog reads as in front of it. */
.transform-dialog::backdrop {
  background: rgb(15 23 42 / 0.45);
}
.transform-head,
.transform-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}
.transform-head {
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}
.transform-head h2 {
  margin: 0;
  font-size: 18px;
}
.transform-x {
  width: 40px;
  padding: 0;
}
.transform-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--rule);
}
.transform-body {
  display: grid;
  grid-template-columns: minmax(150px, 200px) minmax(0, 1fr) minmax(0, 360px);
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  overflow: auto;
  /* Rows stay at the top: stretched to fill the body while it is short, they would shrink, and move the list, as soon
     as a preview makes it scroll. */
  align-content: start;
}
.transform-groups,
.transform-pick,
.transform-preview,
.transform-list,
.transform-pair {
  display: grid;
  align-content: start;
  min-width: 0;
}
.transform-groups,
.transform-list {
  gap: 2px;
}
.transform-pick,
.transform-preview,
.transform-pair {
  gap: 8px;
}
/* A group's tab and a choice: the open or chosen one is washed, with the accent's bar at its start. */
.transform-tab,
.transform-item {
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  border-inline-start: 3px solid transparent;
  border-radius: var(--r-ctl);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.transform-tab {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.transform-tab .count {
  color: var(--ink-2);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.transform-tab:hover,
.transform-item:hover {
  background: var(--fill);
}
.transform-tab[aria-selected="true"],
.transform-item[aria-selected="true"] {
  border-inline-start-color: var(--accent);
  background: var(--accent-wash);
}
.transform-pick .hint {
  margin: 0;
}
.transform-list {
  max-height: 60vh;
  overflow-y: auto;
  border-radius: var(--r-ctl);
}
.transform-list:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* The list's active choice (its aria-activedescendant), where the keyboard is while the list has the focus. */
.transform-list:focus-visible .transform-item.transform-active {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.transform-family {
  margin: 10px 0 4px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}
.transform-list > [role="group"]:first-child .transform-family {
  margin-top: 0;
}
.transform-item {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 8px;
}
.transform-item b {
  font-size: 15px;
  font-weight: 600;
}
.ped-item {
  grid-template-columns: 88px 1fr;
}
.transit-item {
  grid-template-columns: 40px 1fr;
}
.transit-item .dirtag {
  margin: 0;
  text-align: center;
}
/* A template that does not suit the street stays listed, struck through, with its reason as text under it. */
.template-item[aria-disabled="true"] {
  color: var(--ink-2);
}
.template-item[aria-disabled="true"] b {
  text-decoration: line-through;
}
.template-reason {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}
.transform-preview h3 {
  margin: 0;
  font-size: 16px;
}
.transform-preview h4 {
  margin: 4px 0 0;
  font-size: 14px;
}
.transform-side {
  margin: 0;
}
.transform-side figcaption {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}
/* The street's own 2.5D at the column's width; it is looked at, not pressed. */
.transform-figure svg {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.transform-empty,
.transform-no {
  margin: 0;
  color: var(--ink-2);
}
.transform-report {
  margin: 0;
  padding-inline-start: 18px;
  font-size: 14px;
}
@media (max-width: 720px) {
  .transform-body {
    grid-template-columns: minmax(0, 1fr);
  }
  /* The list keeps to part of the height, so the preview under it stays in reach of the choice that shows it. */
  .transform-list {
    max-height: 35vh;
  }
}
@media (forced-colors: active) {
  .transform-tab[aria-selected="true"],
  .transform-item[aria-selected="true"] {
    border-inline-start-color: Highlight;
  }
}

/* ---- touch, small screens, motion --------------------------------------------- */

@media (any-pointer: coarse) {
  /* The toggle is 44px tall here, not the 32px the row above is sized for: it gives up 6px each side, not 3. */
  .add-item,
  .add-topic,
  .add-search,
  .transform-tab,
  .transform-item,
  .check,
  .fit-checks {
    min-height: 44px;
  }
  .ico,
  .stepper .ico {
    width: 44px;
    height: 44px;
  }
  .stepper {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }
  .stepper .wfield input,
  .stepper input,
  .inspector select,
  .var input[type="time"] {
    min-height: 44px;
  }
  .turn {
    min-width: 44px;
    min-height: 44px;
  }
  .transform-x {
    width: 44px;
    min-height: 44px;
  }
  .focus-hint {
    display: none !important;
  }
}

@media (max-width: 899px) {
  .tray-page {
    --rw: 0px;
  }
  .panel.details {
    order: 2;
    max-width: calc(100% - 16px);
  }
  .stage {
    position: static;
    height: auto;
    min-height: 0;
    margin: 0 8px;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    order: 1;
  }
  .stage-main {
    position: static;
    overflow: visible;
    padding: 0;
  }
  .stage-head {
    align-items: stretch;
  }
  .tools {
    justify-content: flex-start;
  }
  .btn .lbl {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .tools .btn:has(.lbl) {
    min-width: 44px;
    justify-content: center;
    padding-inline: 10px;
  }
  .drawing > .scroll {
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ico,
  .turn,
  .opt {
    transition: none;
  }
}

@media print {
  .bar,
  .panel,
  .tools,
  .scenarios,
  .welcome,
  .clock {
    display: none;
  }
  .stage-main,
  .stage-scroll {
    position: static;
    overflow: visible;
  }
}
.tools[hidden],
/* a page shown read-only draws no history: the card would be an empty dot */
.tools:not(:has(button, a, select, input)) {
  display: none;
}

.signal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.signal-list > li > .btn {
  width: 100%;
  text-align: start;
  white-space: normal;
}
.phase-moves {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-top: 6px;
}
.phase-moves-h {
  font-weight: 600;
}
.phase-moves-note {
  flex-basis: 100%;
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
}
.phase-move {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}
/* Pedestrian calls (#60), in the signal plan's level: a crossing's mode and rate, then the hour's tables. */
.calls-crossings,
.act-streets,
.bike-movements,
.transit-streets,
.preempt-streets,
.calls-findings {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.calls-findings > li {
  color: var(--warn);
  font-weight: 600;
}
.call-crossing,
.act-street,
.bike-movement,
.transit-street,
.preempt-street {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.call-name,
.act-name,
.bike-name,
.transit-name,
.preempt-name {
  flex-basis: 100%;
  font-weight: 600;
}
.call-crossing > .insp-range,
.act-street > .insp-range,
.bike-movement > .insp-range,
.transit-street > .insp-range,
.preempt-street > .insp-range {
  flex-basis: 100%;
  margin: 0;
}
.call-rate {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.call-rate-field {
  width: 5em;
  min-height: 24px;
}
/* How a crossing on call detects people (CLM-17): a radio pair under its heading, then what the chosen one does. */
.call-detect {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.call-detect > .insp-range {
  flex-basis: 100%;
  margin: 0;
}
/* Vehicle actuation (CLM-12): a street's mode as a radio pair under its heading, then its four settings with steppers.
   Bicycle detection (CLM-13): a bike movement's mode the same way; transit priority (CLM-14), a street's four choices;
   pre-emption (CLM-15), a street's off and on. */
.act-mode,
.bike-mode,
.transit-mode,
.preempt-mode {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.act-fields {
  flex-basis: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10em, 1fr));
  gap: 8px 12px;
}
.act-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.act-field > .insp-range {
  margin: 0;
}
.calls-table {
  max-width: 100%;
  overflow-x: auto;
  margin-top: 8px;
}
/* A crossing's name keeps a few words a line; the box scrolls sideways instead (it is a focusable region), and the
   names' column (with its heading) stays at the left edge on the panel's own background, in either theme. */
.calls-table th[scope="row"] {
  min-width: 9em;
}
.calls-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--panel);
}
.calls-table caption {
  padding-bottom: 4px;
  text-align: start;
  font-size: 13px;
  font-weight: 600;
}
#calls-rows,
#bikes-rows {
  margin-top: 8px;
}
/* Time-of-day plans (CLM-16), first in the signal plan's level: the plan shown, the plans, each day type's schedule and
   which plan runs at a day and time. The fields take the inspector's select look; the period's controls wrap. */
.plan-chooser,
.plan-runs {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}
.plan-chooser > .insp-range,
.plan-runs > .insp-range {
  margin: 0;
}
.plans-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.plans-list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.plan-name,
.plan-note {
  font-weight: 600;
}
.plans-list > li > .insp-range,
.plans-list > li > .calls-findings {
  flex-basis: 100%;
  margin: 0;
}
.plan-edit,
.plan-add,
.period-add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.plan-add,
.period-add {
  margin-top: 8px;
}
#signal-plans input[type="text"],
#signal-plans input[type="time"] {
  min-width: 0;
  max-width: 100%;
}
/* The locked look of the inspector's other fields (above), kept apart from their rule, whose selectors are pinned. */
#signal-plans input:disabled {
  border-color: var(--rule);
  background: transparent;
  color: var(--ink-2);
  cursor: default;
}
.plan-schedule select,
.period-add select {
  width: auto;
  max-width: 100%;
}
.signal-phases {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.signal-phases > li {
  flex: 1 1 120px;
  min-width: 0;
}
.phase-card {
  position: relative;
  display: grid;
  gap: 2px;
  width: 100%;
  min-width: 0;
  padding: 6px;
  /* Room at the top for the selected card's check mark, so it never lies over the drawing. */
  padding-block-start: 22px;
  text-align: start;
  font: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
/* The selected card is told apart by more than colour: a border twice as thick and a check mark. */
.phase-card[aria-current="true"] {
  background: var(--accent-wash);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.phase-card[aria-current="true"]::after {
  content: "\2713" / "";
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 8px;
  font-weight: 700;
  color: var(--accent);
}
.phase-art {
  display: block;
  min-width: 0;
}
.phase-svg {
  display: block;
  width: 100%;
  max-width: 160px;
  height: auto;
  margin-inline: auto;
}
.phase-name {
  font-weight: 600;
}
.phase-timing,
.phase-summary {
  font-size: 0.85em;
  color: var(--ink-2);
}
.phase-svg .ph-road {
  fill: var(--ph-road);
  stroke: none;
}
.phase-svg .ph-move .ph-line {
  stroke: var(--ph-lit);
  stroke-linecap: butt;
}
.phase-svg .ph-move .ph-head {
  fill: var(--ph-lit);
}
.phase-svg .ph-walk.lit {
  fill: var(--ph-lit);
  stroke: var(--ph-lit);
}
.phase-svg .ph-walk.muted {
  fill: none;
  stroke: var(--ph-muted);
}
.phase-svg .ph-bike .sym * {
  vector-effect: none;
  fill: none;
}
.phase-svg .ph-bike.lit .sym * {
  stroke: var(--ph-lit);
  stroke-width: 3;
}
.phase-svg .ph-bike.muted .sym * {
  stroke: var(--ph-muted);
  stroke-width: 2;
}
/* A movement that meets something in the phase: dashed (set on the line itself) and in the warning colour, so colour is not
   the only cue. */
.phase-svg .ph-move.warn .ph-line {
  stroke: var(--warn);
}
.phase-svg .ph-move.warn .ph-head {
  fill: var(--warn);
}
/* The sentences under a card. */
.phase-conflicts {
  margin: 4px 0 0;
  padding: 6px 8px 6px 22px;
  font-size: 0.85em;
  color: var(--warn);
  background: var(--warn-wash);
  border-radius: 6px;
}
@media (forced-colors: active) {
  .phase-card[aria-current="true"] {
    outline: 2px solid Highlight;
    outline-offset: 1px;
  }
  .phase-svg .ph-road {
    fill: Canvas;
    stroke: GrayText;
  }
  .phase-svg .ph-move .ph-line {
    stroke: Highlight;
  }
  .phase-svg .ph-move .ph-head,
  .phase-svg .ph-walk.lit {
    fill: Highlight;
    stroke: Highlight;
  }
  .phase-svg .ph-walk.muted,
  .phase-svg .ph-bike.muted .sym * {
    stroke: GrayText;
  }
  .phase-svg .ph-bike.lit .sym * {
    stroke: Highlight;
  }
  .phase-svg .ph-move.warn .ph-line {
    stroke: Mark;
  }
  .phase-svg .ph-move.warn .ph-head {
    fill: Mark;
  }
  .phase-conflicts {
    color: CanvasText;
    background: Canvas;
    border: 1px dashed CanvasText;
  }
}
.signal-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-block: 4px;
}
.places-list[hidden] {
  display: none;
}
.selection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#selection-clear {
  margin-top: 8px;
}
.corridor {
  margin-top: 16px;
}
.corridor select {
  display: block;
  margin: 4px 0 8px;
  max-width: 100%;
}
.corridor-rows {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}
.corridor-row {
  padding: 4px 0;
  border-top: 1px solid var(--rule);
}
.corridor-street {
  font-weight: 600;
}
.corridor-row.bad {
  color: var(--ink);
}
