/*
 * The job map, its sheets and control lines: the rules for src/map.js's
 * screens (the map with its rail of buttons and what rises over it, the intake
 * crop, a sheet placed or read), moved out of styles.css as they stood.
 * Linked right after styles.css, so the cascade is what it was; colours are
 * theme tokens where styles.css had them. Every rule here names a map screen
 * or a class only the map uses: no other screen changes by a pixel.
 */

/* Job map: a reference map, not a survey. It fills the phone under the frame
   (design review R4-01), its buttons on it; isolated, so Leaflet's own layers
   stay under the sticky bars and what stands on the map. Its height at the top
   of the page: the screen less the frame (--frame-h, the notch in the
   installed app with it) and 74 px under the map: the gap (10), the head of
   the sheets' list peeking (50) and the pad under it (14), a strip to scroll
   the page by; the home bar's inset too. The map meets the tabs: the screen's
   top pad is the map's (.mapstage, below). */
.mapbox { height: 58vh; height: calc(100dvh - var(--frame-h) - 74px - env(safe-area-inset-bottom, 0px)); min-height: 360px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin: 0; background: var(--bg); isolation: isolate; }
.mapbox .leaflet-control-attribution { font-size: 10px; }
/* Zoom buttons a gloved thumb can hit. */
#map-canvas .leaflet-bar a { width: 46px; height: 46px; line-height: 46px; font-size: 24px; }

/* The work on the map: a shape a kind (task ●, punch ■, SWMP ◆, plan ⬢), a colour a state (--c),
   hollow when placed from a photo; the name from zoom 17 in, taking no tap. */
.leaflet-marker-icon.tm { background: none; border: none; }
.tm .tm-body { position: absolute; inset: 0; }
.tm .tm-shape { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; background: var(--c); border: 3px solid #101820; box-shadow: 0 0 0 2px #ffffff; }
.tm.tm-run .tm-shape { border-radius: 50%; }
.tm.tm-punch .tm-shape { border-radius: 3px; }
.tm.tm-swmp .tm-shape { border-radius: 3px; transform: rotate(45deg) scale(0.88); }
.tm.tm-plan .tm-shape { width: 32px; height: 30px; margin: -15px 0 0 -16px; border: none; box-shadow: none; background: #ffffff; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.tm.tm-plan .tm-shape::after { content: ''; position: absolute; inset: 4px; background: var(--c); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.tm.tm-photo .tm-shape { background: rgba(16, 24, 32, 0.55); border-color: var(--c); }
.tm.tm-plan.tm-photo .tm-shape::after { background: rgba(16, 24, 32, 0.7); }
.tm .tm-count { position: absolute; right: -2px; top: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #101820; color: #ffffff; font: 700 12px/20px system-ui, sans-serif; text-align: center; }
.tm .tm-label { display: none; position: absolute; left: 50%; top: 38px; transform: translateX(-50%); padding: 1px 6px; border-radius: 4px; background: rgba(16, 24, 32, 0.85); color: #ffffff; font: 700 13px/1.3 system-ui, sans-serif; white-space: nowrap; pointer-events: none; }
.near .tm .tm-label { display: block; }
.tm-bearing { stroke-linecap: round; }
/* A marker's card, risen over the map's foot (design review R4-02): what it is, how far, and its Open. On a phone the
   sheet the screen's width (.mapsheet, below); at a desk a card at the map's foot, beside the side column. */
.tmcard { padding: 0 12px 12px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; cursor: auto; }
html.wide .mapstage > .tmcard { position: absolute; left: 12px; bottom: 28px; z-index: 2; width: min(420px, calc(100% - 24px)); max-height: calc(100% - 136px); overflow-y: auto; overscroll-behavior: contain; }
.tmcard .tm-many { display: flex; align-items: center; min-height: 38px; margin: 0 48px 4px 0; color: var(--dim); font-size: 13px; }
.tmcard .tmitem { display: flex; flex-direction: column; gap: 3px; padding: 4px 48px 8px 0; }
.tmcard .tmitem + .tmitem { padding-top: 10px; border-top: 1px solid var(--line); }
.tmcard .tm-title { font-size: 17px; }
.tmcard .tm-state { color: var(--dim); }
.tmcard .tm-dist { margin: 2px 0 0; font-weight: 650; }
.tmcard .tm-open { width: 100%; margin-top: 6px; }
/* Several markers at one spot: a row each, a gloved tap tall, the whole row its Open with the › of a row that opens,
   never a primary each (design review R4-02). */
.tmcard .tmitem:has(> .tm-open.item) { padding: 0; }
.tmcard .tmitem:has(> .tm-open.item) + .tmitem { margin-top: 6px; padding-top: 0; border-top: none; }
.tmcard .tm-open.item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 52px; margin: 0; padding: 6px 34px 6px 12px; }
.tmcard .tm-open.item .tm-title { font-size: 16px; }
.tmcard .tm-open.item :is(.tm-state, .tm-dist) { color: var(--dim); font-size: 13px; font-weight: 500; }
/* The SWMP's control measures: one SVG in its own pane under the work's markers; only what a finger takes answers a tap. */
/* The minimap (miniMap): the job's SWMP on the aerial, read-only, filling the box its page gives it. */
.minimap, .minimap.leaflet-container { position: relative; width: 100%; height: 100%; min-height: 180px; border-radius: 12px; overflow: hidden; background: #1f2a24; cursor: pointer; }
.minimap:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.minimap .leaflet-control-attribution { max-width: 70%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px; line-height: 1.4; }
.minimap-note { position: absolute; left: 8px; bottom: 24px; z-index: 800; max-width: calc(100% - 16px); margin: 0; padding: 4px 8px; border-radius: 8px; background: rgba(16, 24, 32, 0.8); color: #ffffff; font-size: 13px; line-height: 1.3; pointer-events: none; }
.bmp-layer { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.bmp-layer .bmp-hit, .bmp-layer .bmp-id { pointer-events: auto; cursor: pointer; }
.bmp-layer text, .legend-sample text { font-family: system-ui, sans-serif; font-weight: 800; paint-order: stroke; stroke: #ffffff; stroke-width: 3px; stroke-linejoin: round; }
.bmp-layer .bmp-tag.inbox, .legend-sample .bmp-tag.inbox { stroke-width: 2.5px; }
.tmcard .bmp-installed { margin: 2px 0 0; }
.tmcard .bmp-condition { margin: 4px 0 0; font-weight: 650; }
.tmcard .bmp-actions { display: flex; gap: 8px; margin-top: 8px; }
.tmcard .bmp-actions .btn { flex: 1 1 0; min-width: 0; padding-left: 6px; padding-right: 6px; }
.tmcard .bmp-condition.maintenance { color: var(--warn); }
.tmcard .bmp-condition:is(.inadequate, .additional) { color: var(--danger); }
.tmcard .bmp-condition.remove { color: var(--dim); }
.tmcard .bmp-condition.removed { color: var(--dim); }
/* The Legend over the map's foot: the families, every symbol the job uses, and what the marks by an id say. */
.maplegend .lbl { margin: 0 0 6px; padding-right: 48px; }
.legend-families { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legend-family { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.legend-family .swatch { flex: none; width: 14px; height: 14px; border-radius: 3px; }
.maplegend .hint { margin: 6px 0; font-size: 13px; }
.legend-symbols, .legend-features { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.legend-symbol, .legend-feature { display: flex; align-items: center; gap: 10px; }
.legend-sample { flex: none; background: #ffffff; border-radius: 6px; }
.legend-words { display: flex; flex-direction: column; min-width: 0; }
.legend-words small { color: var(--dim); }
.legend-states { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--dim); }
.legend-state { display: inline-flex; align-items: center; gap: 5px; }
/* A tap on the map: where it is, in stations, and what to do there. */
.mapreadout .mr-where { display: block; padding-right: 48px; font-size: 17px; }
.mapreadout .mr-numbers { display: block; color: var(--dim); }
.mapreadout .mr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mapreadout .mr-actions .btn { flex: 1 1 0; min-width: 120px; }
.leaflet-marker-icon.mr-spot { background: none; border: none; }
.mr-spot span { position: absolute; inset: 4px; border-radius: 50%; border: 3px solid #ffd23d; box-shadow: 0 0 0 2px #101820; }
.mr-spot span::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #ffd23d; }
/* Measuring: its bar in the sheet over the map's foot (.mapbars), the line and its length on the map. */
.measurebar { align-items: center; gap: 8px; }
.measurebar #map-measure-text { font-size: 18px; font-weight: 700; }
.leaflet-marker-icon.measure-label { background: none; border: none; width: 0; height: 0; }
.measure-label span { display: inline-block; transform: translate(-50%, -140%); padding: 3px 8px; border-radius: 6px; background: rgba(16, 24, 32, 0.9); color: #ffd23d; font: 800 14px/1.2 system-ui, sans-serif; white-space: nowrap; }
/* North is up, and the scale is in feet: on the map itself, where the sun cannot wash them out. */
.map-north { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 40px; height: 44px; background: rgba(255, 255, 255, 0.92); color: #101820; font: 800 13px/1 system-ui, sans-serif; pointer-events: none; }
.map-north .arrow { font-size: 14px; line-height: 1; }
/* The scale in feet, read at arm's length: 12/700, as nothing on the map is smaller (design review R1-08). */
#map-canvas .leaflet-control-scale-line { border-color: #101820; background: rgba(255, 255, 255, 0.85); color: #101820; font: 700 12px/1.3 system-ui, sans-serif; }
/* The scale and the credit, lifted above a phone's sheet (map.js clearUnderSheet), never take a tap meant for the map;
   the credit's links still answer. */
#map-canvas .leaflet-control-scale, #map-canvas .leaflet-control-attribution { pointer-events: none; }
#map-canvas .leaflet-control-attribution a { pointer-events: auto; }

/* At a desk, the work in the side column, a dot for its kind and state. */
.maplist .tmrow .top { align-items: center; }
.tm-dot { flex: none; display: inline-block; width: 14px; height: 14px; background: var(--c); border: 2px solid #101820; }
.tm-dot.tm-run { border-radius: 50%; }
.tm-dot.tm-swmp { transform: rotate(45deg) scale(0.85); }
.tm-dot.tm-plan { border: none; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }

/* The job map in a box on another screen (mapWindow): the caller gives it a height; its pins numbered. */
.mapwindow { isolation: isolate; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.mapwindow .leaflet-control-attribution { font-size: 10px; }
/* The datum picked by eye (found in use, 80): the file drawn both ways, a row per reading with its This one under the map. */
.dpick { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; margin: 0; scroll-margin-top: 64px; }
.dpick > p { margin: 0; }
.dpick-head { font-weight: 700; }
.dpick-map { height: 55vh; min-height: 220px; }
.dpick-row { display: flex; align-items: center; gap: 8px; }
.dpick-swatch { flex: none; width: 22px; height: 6px; border-radius: 3px; }
.dpick-words { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-small); }
.dpick-row .btn { flex: none; }
.leaflet-tooltip.dpick-sta { background: rgba(16, 24, 32, 0.85); border: none; border-radius: 4px; box-shadow: none; color: #ffffff; font: 600 12px/1.2 system-ui, sans-serif; padding: 1px 4px; }
.leaflet-tooltip.dpick-sta::before { display: none; }
.leaflet-tooltip.dpick-sta-grid { color: #38bdf8; }
.leaflet-tooltip.dpick-sta-ground { color: #f97316; }
.leaflet-marker-icon.mw-pin { background: none; border: none; }
.leaflet-marker-icon.mw-pin span { position: absolute; inset: 4px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 3px solid #ffffff; background: #ff8a3d; color: #101820; font: 800 14px/1 system-ui, sans-serif; box-shadow: 0 0 0 2px #101820; }
.leaflet-marker-icon.mw-pin.active span { inset: 0; border-width: 4px; box-shadow: 0 0 0 3px #101820, 0 0 0 7px rgba(255, 210, 61, 0.8); font-size: 16px; }

/* The map's stage (design review R4-01): the map and what stands on it. On a phone it takes the screen's full width,
   gutters and all: the map edge to edge. */
.mapstage { position: relative; }
html:not(.wide) .mapstage { margin: 0 -14px; }
html:not(.wide) .mapstage > .mapbox { border-width: 0 0 1px; border-radius: 0; }
/* It meets the tabs, no strip of the page between: the screen's top pad goes to the map. With a way back its row
   stands between them, and the map is that much shorter (the pad, the row and its gap), the sheets' list still peeking. */
html:not(.wide) #screen-map:has(.maphead > #map-back[hidden]) .mapstage { margin-top: -14px; }
html:not(.wide) #screen-map:has(.maphead > #map-back:not([hidden])) .mapbox { height: calc(100dvh - var(--frame-h) - 146px - env(safe-area-inset-bottom, 0px)); }
/* The rail: the map's own buttons, round and a gloved tap wide (--glove, which never follows --tap), down the map's
   right edge over the zoom, clear of the middle the map is tapped in. White with a dark ring, as North is; Layers dark
   while its sheet is up. At a desk the side column is Layers, and the rail has no button for it. Where am I (item 132)
   the same, with a red dot at its corner (.has-news) when the station line changed while its sheet was shut. */
.maptools { position: absolute; right: 10px; bottom: 132px; z-index: 1; display: flex; flex-direction: column; gap: 8px; }
.maptools .mt { position: relative; display: flex; align-items: center; justify-content: center; width: var(--glove); height: var(--glove); padding: 0; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.95); color: #101820; box-shadow: 0 0 0 2px #101820, 0 2px 6px rgba(0, 0, 0, 0.4); cursor: pointer; }
.maptools .mt svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.maptools .mt svg .dot { fill: currentColor; stroke: none; }
.maptools .mt:active { filter: brightness(0.85); }
.maptools .mt[aria-expanded="true"] { background: #101820; color: #ffffff; box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #101820, 0 2px 6px rgba(0, 0, 0, 0.4); }
/* Hover, where a pointer hovers (a touch screen's taps never leave it lit; design review R1-18). */
@media (any-hover: hover) {
  .maptools .mt:not([aria-expanded="true"]):hover { background: #e3e8ee; }
}
html.wide .maptools #map-layers-btn { display: none; }
.maptools .mt.has-news::after { content: ''; position: absolute; top: 3px; right: 3px; width: 12px; height: 12px; border-radius: 50%; background: #d4202a; box-shadow: 0 0 0 2px #ffffff; }
.maptools .mt[aria-expanded="true"].has-news::after { display: none; }
/* A phone on its side (found in use, item 22): the map down to the screen's foot under the pinned tabs, and the rail a
   row along its foot beside the zoom, so its buttons fit a map 300 px tall; nothing else on the map moves. */
@media (orientation: landscape) and (max-height: 540px) {
  html:not(.wide) #screen-map .mapbox { height: calc(100dvh - var(--frame-pinned) - 8px); min-height: 240px; }
  html:not(.wide) #screen-map:has(.maphead > #map-back:not([hidden])) .mapbox { height: calc(100dvh - var(--frame-pinned) - 60px); }
  html:not(.wide) .maptools { flex-direction: row; right: 64px; bottom: 28px; }
}
/* The map's title row (styles.css .screenhead, design review R1-04): its h1 is a screen reader's (.visually-hidden), so
   the row stands only while the map has a back, and the map never moves down for an empty one. */
#screen-map .maphead:has(> #map-back[hidden]) { position: absolute; min-height: 0; }
/* Layers' toggles: short words, a gloved tap high, two to a row; when their thing is on, drawn as picked (the soft
   fill, the ring and a tick of .chip.on), never as the primary button. */
.maptoggles { display: flex; flex-wrap: wrap; gap: var(--gap-chip); }
.maptoggles .mt { flex: none; min-width: 0; min-height: var(--chip-tight); padding: 4px var(--pad-x); border: 1px solid var(--edge); border-radius: var(--r-pill); background: var(--panel); box-shadow: var(--lift); color: var(--ink); font: inherit; font-size: 15px; font-weight: 650; white-space: nowrap; }
.maptoggles .mt:active { filter: brightness(0.88); }
@media (any-hover: hover) {
  .maptoggles .mt:not(.on):hover { background: var(--panel2); }
  .maptoggles .mt.on:hover { filter: brightness(1.08); }
}
.maptoggles .mt.on { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--ink); font-weight: 700; }
.maptoggles .mt.on::before { content: "✓"; margin-right: 3px; font-weight: 700; }
/* What rises over the map's foot on a phone (design review R4-01, R4-02): a sheet the screen's width, rounded at the
   top, the map in sight above it, never modal (the app's .sheet is); its head a bar to drag it down by and the 48 px
   ×, held in view while it scrolls. At a desk its head is only the × over the top. */
html:not(.wide) .mapsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: calc(var(--z-sheet) - 1); max-height: 50dvh; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0 16px calc(14px + env(safe-area-inset-bottom)); background: var(--panel); color: var(--ink); border: 0; border-top: 1px solid var(--line-strong); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35); }
html:not(.wide) :is(#map-legend, #map-layers-sheet).mapsheet { max-height: 62dvh; }
/* It rises as it comes up, and goes back up where a drag down was let go short (never with reduced motion). */
@media (prefers-reduced-motion: no-preference) {
  html:not(.wide) .mapsheet { animation: mapsheetrise 180ms ease-out; }
  html:not(.wide) .mapsheet:not(.dragging) { transition: transform 160ms ease-out; }
  @keyframes mapsheetrise { from { opacity: 0; transform: translateY(24px); } }
}
.mapsheet-head { position: sticky; top: 0; z-index: 2; height: 10px; }
html:not(.wide) .mapsheet-head { height: 24px; margin: 0 -16px; background: inherit; touch-action: none; cursor: grab; }
html:not(.wide) .mapsheet-head::before { content: ''; position: absolute; left: 50%; top: 9px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line-strong); }
.mapsheet-head .tm-close { position: absolute; right: 2px; top: 2px; width: 48px; height: 48px; padding: 0; border: none; background: none; color: var(--dim); font-size: 28px; line-height: 1; cursor: pointer; }
/* Layers: on a phone a sheet the rail's Layers raises (map.js openLayers), at a desk the head of the side column. The two
   plan layers, then More, shut to start (item 38), its rows lists that wrap but for the imagery's carousel (item 27). */
#map-layers-sheet { display: flex; flex-direction: column; gap: 8px; }
#map-layers-sheet > .lbl { margin: 0; padding-right: 48px; }
html:not(.wide) #map-layers-sheet:not(.open) { display: none; }
html:not(.wide) #map-layers-sheet .chips.scroll { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
html.wide #map-layers-sheet > .mapsheet-head { display: none; }
/* Where am I (item 132): what the white box over the map's top held, in the slot over its foot, shut until the rail's
   button opens it. The station line large, Sheets here beside it, then what the map says. At a desk a card at the
   map's foot, as a marker's is. */
#map-info-sheet { display: flex; flex-direction: column; gap: 8px; }
#map-info-sheet:not(.open) { display: none; }
#map-info-sheet > .lbl { margin: 0; padding-right: 48px; }
#map-info-sheet #map-station { align-items: center; gap: 6px 8px; flex-wrap: wrap; }
#map-info-sheet #map-station-text { flex: 1 1 180px; min-width: 0; margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
#map-info-sheet #map-sheets-here { min-height: var(--tap-row); margin-left: auto; }
#map-info-sheet :is(#map-status, #map-info-none) { margin: 0; }
#map-info-sheet #map-status:empty { display: none; }
html.wide .mapstage > #map-info-sheet { position: absolute; left: 12px; bottom: 28px; z-index: 2; width: min(420px, calc(100% - 24px)); max-height: calc(100% - 136px); overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 12px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
html.wide #map-info-sheet > .lbl { padding-top: 10px; }
/* What the map is doing, in one sheet over its foot (design review R4-02): a pick's words, the pin's bar, a measure,
   the limits, a site feature being drawn. On a phone the sheet the card rises in, up while one of its rows is, no bar to
   drag it by (Cancel, Done or Save ends what is going on); at a desk a card at the map's foot, wider than the card for
   a site feature's fields. Nothing of it stands above the map. */
.mapbars { display: flex; flex-direction: column; gap: 10px; }
.mapbars:not(:has(> :not([hidden]))) { display: none; }
html:not(.wide) .mapbars { padding-top: 16px; }
html.wide .mapstage > .mapbars { position: absolute; left: 12px; bottom: 28px; z-index: 2; width: min(560px, calc(100% - 24px)); max-height: calc(100% - 136px); overflow-y: auto; padding: 12px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
/* A pick's words: the sheet is their box; its Cancel (and Done, moving a sheet's points) a whole tap at their end, or
   under them at the right when the line has no room. */
.mapbars #map-pick { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 0; border: none; border-radius: 0; background: none; }
.mapbars #map-pick-text { flex: 1 1 200px; }
.mapbars #map-pick .btn { flex: none; min-height: var(--tap); }
/* The limits: the count over its three buttons, each a share of the row. */
.mapbars #map-limits-bar { align-items: center; gap: 8px; }
.mapbars #map-limits-count { flex: 1 1 100%; margin: 0; }
.mapbars #map-limits-bar .btn { flex: 1 1 0; }
/* A toast while a sheet is up over the foot of the map or of the sheet editor on a phone: over the sheet, never on its
   buttons (map.js watchSheet keeps the tallest one's height in --mapsheet-h), and over the editor's Save bar. */
html:not(.wide) body:has(:is(#screen-map, #screen-sheet):not([hidden])) .toast { bottom: calc(20px + max(var(--mapsheet-h, 0px), var(--actionbar-h, 0px)) + env(safe-area-inset-bottom)); }
/* The sheet editor's four panels (design review R3-07): on a phone each rises as the map's card does (.mapsheet), over
   the Save bar while it is up, the sheet in sight above it; no bar to drag it by, its own Cancel puts it away. */
html:not(.wide) .shsheet { padding-top: 16px; }
html:not(.wide) #sh-line-panel.mapsheet { max-height: 62dvh; }
/* While one is up the screen has room under the sheet to scroll it to the top, in sight above the panel (map.js
   revealPanel), however little is under it. */
html:not(.wide) #screen-sheet:has(.shsheet:not([hidden])) { padding-bottom: 62dvh; }
/* The sheet's tools under the editor's ⋯ (design review R3-07); the ⋯ goes when none of them applies. */
#sh-menu:not(:has(.menubody > :not([hidden]))) { display: none; }
/* At a desk the rail is on the map, so the map takes the old row of buttons' height as well, down to the page's foot
   (desktop.css sized it under the row). */
html.wide .mapstage > #map-canvas { height: calc(100vh - 72px); }

/* In Layers: the two plan layers, a select each with a stroke of its ink before its word (black, red), then More. */
.mapctl { display: flex; flex-direction: column; gap: 4px; }
.layerpicks { display: flex; flex-direction: column; gap: 6px; }
.layerpick { display: flex; align-items: center; gap: 10px; }
.layerpick .layerword { flex: none; width: 76px; color: var(--dim); font-size: 15px; font-weight: 600; }
.layerpick select { flex: 1 1 auto; min-width: 0; min-height: 40px; }
.layerink { flex: none; width: 18px; height: 4px; border-radius: 2px; }
.layerink.one { background: #000000; box-shadow: 0 0 0 1px var(--line-strong); }
.layerink.two { background: #d62828; }
/* More: what is on the map, the imagery, the opacity and white, shut to start under one line. */
.mapctl > .mapmore { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.mapctl > .mapmore > summary { margin: 0; padding: 0; font-size: 15px; }
.mapctl > .mapmore > .foldbody { gap: 6px; padding-top: 4px; }
.mapctl > .mapmore .foldbody > .hint { margin: 0; }
.mapctl > .hint.locate { margin: 0; color: var(--text); font-weight: 600; }
.mapctl .slider { display: flex; align-items: center; gap: 12px; }
/* A phone's carousel in Layers (item 27): the imagery one row of cards that slides sideways,
   a card one line, its name and a small tag at its right edge ("not reachable"), lit when on; a
   greyed one (Esri not reachable now) still a tap. */
.carousel { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > .ccard { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; max-width: 72vw; min-height: var(--tap-row); scroll-snap-align: start; margin: 0; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--panel); color: var(--ink); font: inherit; text-align: left; white-space: nowrap; cursor: pointer; }
.carousel > .ccard b { min-width: 0; overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; }
.carousel > .ccard .ccard-tag { flex: none; margin-left: auto; color: var(--dim); font-size: 12px; font-weight: 600; }
.carousel > .ccard.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.carousel > .ccard.on .ccard-tag { color: inherit; opacity: 0.8; }
.carousel > .ccard.off { border-style: dashed; opacity: 0.55; }
.imagerychips .chip.off { opacity: 0.55; }
/* The imagery row: each source a chip with its line under its name. */
/* The imagery: a source's name alone in its segment or chip; the chosen one's note on the line under the row. */
.imagerychips .chip b { font-weight: inherit; }
.mapctl #map-imagery-note:empty { display: none; }
.imageryadd { gap: 6px; flex-wrap: wrap; }
.imageryadd input { min-height: 40px; min-width: 0; }
.imageryadd #map-imagery-name { flex: 0 1 140px; }
.mapctl .slider > span { flex: none; width: 64px; color: var(--dim); font-size: 15px; font-weight: 600; }
.mapctl .slider input { flex: 1; min-width: 0; min-height: var(--tap); padding: 0; border: none; background: none; accent-color: var(--accent); }
.mapctl .slider output { flex: none; min-width: 44px; text-align: right; color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.mapctl .ctlchecks { display: flex; flex-wrap: wrap; gap: 0 18px; }
.mapctl .hint { margin: 0; }
/* The Unsorted button says how many sheets still need a division. */
#shs-layers .chip .count { display: inline-block; min-width: 22px; margin-left: 6px; padding: 0 6px; border-radius: var(--r-pill); background: var(--tint-warm-bg); color: var(--tint-warm-ink); font-size: 13px; font-weight: 700; line-height: 22px; text-align: center; }
#shs-layers .chip.on .count { background: var(--accent-ink); color: var(--accent); }
/* The job's sheets under the map: a list that opens and shuts, its rows compact. */
.sheetsbox { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.sheetsbox > summary { min-height: var(--tap); display: flex; align-items: center; padding: 0 14px; font-weight: 650; cursor: pointer; }
.sheetsbox > .list { padding: 0 8px 8px; }
/* A sheet's row (design review R3-06): one tap on it opens the sheet (View; a boss's editor for a plan not placed yet)
   with the › of a row that opens, a whole tap tall; its ⋯ holds the rest (map.js sheetMenu). What each match line
   meets stays under it, a line not paired with its Pair with…. */
.item.sheetrow { display: flex; flex-direction: column; padding: 0; }
.sheetrow-head { display: flex; align-items: flex-start; gap: 4px; }
.sheetrow .rowmain { display: block; flex: 1; min-width: 0; min-height: var(--tap); padding: var(--g-2) var(--g-3); border: 0; border-radius: var(--r-l); background: none; color: inherit; font: inherit; text-align: left; }
.sheetrow button.rowmain { position: relative; padding-right: 30px; cursor: pointer; }
.sheetrow button.rowmain::after { content: "›"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 22px; line-height: 1; pointer-events: none; }
.sheetrow .rowmain > .top { flex-wrap: wrap; row-gap: 4px; align-items: center; }
.sheetrow .rowmain > .meta { display: block; }
.sheetrow-head > details.menu { margin: 0 2px 0 0; }
.sheetrow > .meta { margin: 0 12px 8px; }
.list.compact .item.sheetrow .rowmain { padding: 8px 30px 8px 10px; }
@media (any-hover: hover) {
  .sheetrow button.rowmain:hover { background: var(--panel2); }
}

/* A place picked for another screen: its bar in the sheet over the map's foot (.mapbars), the map whole above it. */
.pickbar { display: flex; flex-direction: column; gap: 8px; }
.pickbar .hint { margin: 0; }
.pickbar .row { gap: 8px; align-items: stretch; }
/* The pin: a teardrop, point down on the spot, big enough to drag with a glove. */
.leaflet-marker-icon.pickpin { background: none; border: none; }
.leaflet-marker-icon.pickpin span { position: absolute; left: 4px; top: 2px; width: 36px; height: 36px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #ff5a36; border: 3px solid #ffffff; box-shadow: 0 0 0 2px #101820, 0 3px 8px rgba(0, 0, 0, 0.5); }
.leaflet-marker-icon.pickpin span::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #ffffff; }
.leaflet-container .sheet-overlay { max-width: none !important; max-height: none !important; }
.mappop { display: flex; flex-direction: column; gap: 6px; min-width: 160px; color: #111; }
.mappop small { color: #555; }
#map-pick, #sh-verdict { font-size: 16px; font-weight: 600; text-align: left; }
/* Delete armed: the next tap deletes (the page's .confirm is a panel; this is a button), and the line under it says what goes with it. */
#sh-delete.confirm, #sh-start-over.confirm, #ap-start-over.confirm { display: inline-flex; flex-direction: row; gap: 0; padding: var(--pad-y) var(--pad-x); border: 1px solid var(--danger); border-radius: var(--r-m); background: var(--danger); color: var(--danger-ink); }
/* Merge armed (item 111): as Delete armed, the seams it merges said under it. */
#sh-seam-merge.armed { border: 1px solid var(--danger); background: var(--danger); color: var(--danger-ink); }
#sh-delete-said, #sh-seam-merge-said { margin: 8px 0 0; padding: 2px 0 2px 10px; border-left: 4px solid var(--danger); font-size: 15px; font-weight: 600; line-height: 1.35; }
#map-pick:empty, #sh-verdict:empty { display: none; }
/* A sheet's layer on its row: untagged is said quietly, so the tagged read first. */
.sheetrow .chip.layer.untagged { color: var(--dim); border-style: dashed; }
/* A sheet with no division says so, in the warm colour, where its division would be. */
.sheetrow .chip.layer.needs-layer { border-style: solid; border-color: var(--tint-warm-ink); background: var(--tint-warm-bg); color: var(--tint-warm-ink); font-weight: 650; }
.status.fit-good { color: var(--tint-green-ink); }
.status.fit-fair { color: var(--tint-warm-ink); }
.status.fit-poor { color: var(--tint-red-ink); }
.status.fit-unchecked, .status.fit-unplaced { color: var(--dim); }
.steer.fit-good { border-color: var(--ok); }
.steer.fit-fair { border-color: var(--warn); }
.steer.fit-poor { border-color: var(--danger); }
/* A sheet's zoom, − and +: used standing up, a gloved tap (design review R1-09). */
:is(#sh-zoom-out, #sh-zoom-in, #cr-zoom-out, #cr-zoom-in, #sv-zoom-out, #sv-zoom-in) { min-width: var(--glove); min-height: var(--glove); }
/* The crop, the sheet and the sheet view at a desk (design review R1-18): the sheet in the main column, held in view
   (sticky) while the column of its controls beside it scrolls; the title row over both. The controls come in two
   .shside blocks, before and after the sheet, so a phone's page keeps its order: there the wrappers are not there. */
.shmain, .shside { display: contents; }
html.wide :is(#screen-crop, #screen-sheet, #screen-sheetview) { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 24px; align-items: start; }
html.wide :is(#screen-crop, #screen-sheet, #screen-sheetview) > .screenhead { grid-column: 1 / -1; }
html.wide :is(#screen-crop, #screen-sheet, #screen-sheetview) > .shmain { display: block; grid-column: 1; grid-row: 2 / span 2; align-self: stretch; min-width: 0; }
html.wide :is(#screen-crop, #screen-sheet, #screen-sheetview) > .shside { display: block; grid-column: 2; min-width: 0; }
html.wide :is(#screen-crop, #screen-sheet, #screen-sheetview) > .shmain > .sheetview { position: sticky; top: 24px; max-height: calc(100vh - 48px); }
.sheetview { overflow: auto; max-height: 60vh; border: 1px solid var(--line); border-radius: 12px; background: #ffffff; margin: 8px 0; -webkit-overflow-scrolling: touch; }
/* On a phone a sheet's box keeps its scroll: panned to its edge, the page does not scroll on (design review, Later). The
   sheet view's and the crop's take two fingers themselves, the sheet zoomed, not the page (map.js pinchSheet). */
html:not(.wide) .sheetview { overscroll-behavior: contain; }
html:not(.wide) :is(#sv-view, #cr-view) { touch-action: pan-x pan-y; }
.sheetstage { position: relative; display: inline-block; line-height: 0; }
#sh-img { display: block; max-width: none; height: auto; cursor: crosshair; }
.sheetmarks { position: absolute; inset: 0; pointer-events: none; }
.shmark { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; border: 3px solid #ff5a36; background: rgba(255, 90, 54, 0.3); color: #ffffff; font: 700 12px/18px system-ui, sans-serif; text-align: center; text-shadow: 0 0 2px #000000; }
.shmark.pending { border-color: #4ea1ff; background: rgba(78, 161, 255, 0.35); }
#sh-pending > button { width: 100%; }

/* Cropping a sheet at intake: the lit rectangle is what stays. */
#cr-img { display: block; max-width: none; height: auto; cursor: crosshair; }
.cropstage { overflow: hidden; vertical-align: top; }
.croprect { position: absolute; border: 2px solid #ffd23d; box-shadow: 0 0 0 9999px var(--scrim); pointer-events: none; }
.shmark.crop { border-color: #ffd23d; background: rgba(255, 210, 61, 0.4); color: #101820; text-shadow: none; }
.cropactions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cropactions .btn { width: 100%; }
/* A photo of paper: Square it up (lit while its four dots are out), Flatten the paper, and the paper sizes. */
.crpaperrow { align-items: center; margin-top: 4px; }
#cr-square[aria-pressed="true"], #cr-outline[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#cr-outline-tools { margin-top: 4px; }
#cr-paper { margin-top: 4px; }
/* The paper flattened, over the kept area only: the table round it stays as shot. */
.cropflat { position: absolute; pointer-events: none; }
/* Squaring: the sheet's outline through the four dots, the rest dimmed. */
.cropquad { position: absolute; inset: 0; pointer-events: none; }
.cropquad svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cropquad .dim { fill: var(--scrim); fill-rule: evenodd; }
.cropquad .edge { fill: none; stroke: #ffd23d; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
/* A corner to drag: a whole touch target round a ringed dot, its middle pricked so the corner shows through. */
.cropcorner { position: absolute; width: var(--glove); height: var(--glove); margin: calc(var(--glove) / -2) 0 0 calc(var(--glove) / -2); padding: 0; border: none; border-radius: 50%; background: transparent; pointer-events: auto; touch-action: none; cursor: grab; -webkit-tap-highlight-color: transparent; }
.cropcorner::after { content: ''; position: absolute; left: 50%; top: 50%; box-sizing: border-box; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 3px solid #ffd23d; background: rgba(255, 210, 61, 0.3); box-shadow: 0 0 0 2px rgba(16, 24, 32, 0.65); }
.cropcorner::before { content: ''; position: absolute; left: 50%; top: 50%; z-index: 1; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #ff5a36; }
.cropcorner.held { cursor: grabbing; }
.cropcorner.held::after { width: 34px; height: 34px; margin: -17px 0 0 -17px; background: rgba(255, 210, 61, 0.12); }
/* Draw around it: a numbered point to tap, drag or pick, a whole touch target round it; point 1 ringed while a tap on it closes the outline. */
.cropquad .keep { fill: none; stroke: #ffd23d; stroke-width: 2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.cropvertex { position: absolute; z-index: 1; display: flex; align-items: center; justify-content: center; width: var(--glove); height: var(--glove); margin: calc(var(--glove) / -2) 0 0 calc(var(--glove) / -2); padding: 0; border: none; border-radius: 50%; background: transparent; color: #101820; font: 700 12px/1 system-ui, sans-serif; pointer-events: auto; touch-action: none; cursor: grab; -webkit-tap-highlight-color: transparent; }
.cropvertex::before { content: ''; position: absolute; left: 50%; top: 50%; z-index: -1; box-sizing: border-box; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid #101820; background: #ffd23d; }
.cropvertex.first::before { box-shadow: 0 0 0 4px rgba(255, 210, 61, 0.5), 0 0 0 7px rgba(16, 24, 32, 0.6); }
.cropvertex.sel::before { background: #ff5a36; border-color: #ffffff; }
.cropvertex.sel { color: #ffffff; }
.cropvertex.held { cursor: grabbing; }
.cropvertex.held::before { width: 30px; height: 30px; margin: -15px 0 0 -15px; opacity: 0.7; }
/* The outline on the sheet in its editor: what of it shows on the map. */
.mllayer .keep { fill: none; stroke: #ffd23d; stroke-width: 3; stroke-dasharray: 8 6; }

/* Item 87: the line's survey drawn back through a placed sheet: thin, teal, a tick and its station at each hundred. */
.survlayer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.survlayer polyline { fill: none; stroke: #12b5a5; stroke-width: 3; }
.survlayer line.tick { stroke: #12b5a5; stroke-width: 2; }
.survlayer text { fill: #0b7d72; font-weight: 600; paint-order: stroke; stroke: rgba(255, 255, 255, 0.85); stroke-width: 3px; }
/* Item 94: the line picked, in one line, with Merge into… beside it; a mark's distance from its surveyed station. */
.shhclinfo { align-items: center; gap: 8px; margin: 4px 0 0; }
.shhclinfo .hint { margin: 0; }
.shhclmerge { display: grid; gap: 6px; margin: 6px 0; }
.shhclmerge[hidden] { display: none; }
.shhclmerge .shmergesaid { margin: 0; color: var(--ink); font-weight: 600; }
.shfit { font-weight: 600; }
.shfit.fit-good { color: var(--tint-green-ink); }
.shfit.fit-poor { color: var(--tint-red-ink); }
.sh-mark-res { color: var(--dim); font-size: var(--fs-hint); margin-left: 6px; white-space: nowrap; }

/* Match lines on a sheet: dashed, with their ends lettered and the label at the middle. */
.mllayer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.mllayer line { stroke: #b44dff; stroke-width: 3; stroke-dasharray: 10 6; }
.mllayer line.pending { stroke: #4ea1ff; }
/* A structure line: the same feature on both sheets, thin and dash-dot, nothing cut at it. */
.mllayer line.structure { stroke-width: 2; stroke-dasharray: 14 5 3 5; }
.shmark.mllabel.structure { background: rgba(90, 60, 150, 0.9); font-style: italic; }
/* A line placed from its label alone (item 86): a guess at the seam, not confirmed: thin, short dashes, amber, "where is it?". */
.mllayer line.unsure { stroke: #ffb020; stroke-width: 2; stroke-dasharray: 4 8; }
.shmark.mllabel.unsure { background: rgba(140, 84, 0, 0.92); }
.item.mlrow .mlsource { margin: 2px 0 0; }
.item.mlrow .mlsource.unsure { color: var(--warn); font-weight: 600; }
.shmark.mlend { width: 20px; height: 20px; margin: -10px 0 0 -10px; border-color: #b44dff; background: rgba(180, 77, 255, 0.35); font-size: 12px; line-height: 14px; }
.shmark.mlend.pending { border-color: #4ea1ff; background: rgba(78, 161, 255, 0.35); }
/* A match line being edited: its ends are handles. A finger on a phone holds one, then drags. */
.sheetmarks .shmark.ml-end { pointer-events: auto; touch-action: none; cursor: grab; width: 32px; height: 32px; margin: -16px 0 0 -16px; line-height: 26px; font-size: 12px; }
.sheetmarks .shmark.ml-end.held { cursor: grabbing; border-color: #ffd23d; }
.sheetmarks .shmark.ml-end.picked { box-shadow: 0 0 0 3px #ffd23d; }
/* A handle's hit is a gloved finger's (--glove) round it, however small it is drawn (design review R1-09). */
.sheetmarks .shmark.ml-end::after { content: ''; position: absolute; left: 50%; top: 50%; width: var(--glove); height: var(--glove); margin: calc(var(--glove) / -2) 0 0 calc(var(--glove) / -2); }
/* At a desk with a mouse: a 20 px square with its letter in the handle's gloved hit (the ::after above), lit under the
   mouse, yellow while held; a touch screen at the desk layout keeps a finger's 32 px handles, held before they drag
   (html.wide:not(.touch), as plansets.css has it). In Match lines with nothing in hand, a line's end takes a 40 px hit
   area at the desk layout, a touch screen's too (.ml-grab): a mouse's press opens the edit and drags (grabLineEnd); a
   finger's does nothing, its touch-action left alone so the sheet pans past it. Lit under a pointer that hovers. */
html.wide:not(.touch) .sheetmarks .shmark.ml-end { width: 20px; height: 20px; margin: -10px 0 0 -10px; border-width: 2px; border-radius: 4px; font-size: 12px; line-height: 16px; }
html.wide .sheetmarks .shmark.mlend.ml-grab { pointer-events: auto; cursor: grab; }
html.wide .sheetmarks .shmark.ml-grab::after { content: ''; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; }
html.wide:not(.touch) .sheetmarks .shmark.ml-end:hover { border-color: #ffd23d; background: rgba(78, 161, 255, 0.75); }
@media (any-hover: hover) {
  html.wide .sheetmarks .shmark.ml-grab:hover { border-color: #ffd23d; background: rgba(180, 77, 255, 0.75); }
}
html.wide:not(.touch) .sheetmarks .shmark.ml-end.held { cursor: grabbing; border-color: #101820; background: #ffd23d; color: #101820; text-shadow: none; box-shadow: 0 0 0 3px rgba(255, 210, 61, 0.45), 0 2px 8px rgba(0, 0, 0, 0.45); }
/* Item 117: a match line's end is a crosshair, not a box over the sheet: two thin lines (the line's purple, blue being
   drawn, yellow held, picked or under the mouse) with a small red dot at the exact point, edged dark so they show on
   white or black paper, and its letter beside the cross's top, never over the point. The drawn marker is thin; its hit stays
   the box's (and the ::after's gloved or 40 px area), so dragging and tapping are as before, desk and phone alike.
   Same spots (.tie) keep their dotted rings. These win over the boxes' colours above (one look, every state). */
.shmark.mlend:not(.tie) { --mlx: #b44dff; }
.shmark.mlend.pending:not(.tie) { --mlx: #4ea1ff; }
.shmark.mlend.held:not(.tie), .shmark.mlend.picked:not(.tie) { --mlx: #ffd23d; }
@media (any-hover: hover) {
  html.wide .sheetmarks .shmark.mlend:not(.tie):hover { --mlx: #ffd23d; }
}
.sheetmarks .shmark.mlend:not(.tie) {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background:
    radial-gradient(circle, #ff2a2a 0 2px, #101820 2px 3px, transparent 3px),
    linear-gradient(var(--mlx), var(--mlx)) center / 100% 1px no-repeat,
    linear-gradient(var(--mlx), var(--mlx)) center / 1px 100% no-repeat,
    linear-gradient(rgba(16, 24, 32, 0.7), rgba(16, 24, 32, 0.7)) center / 100% 3px no-repeat,
    linear-gradient(rgba(16, 24, 32, 0.7), rgba(16, 24, 32, 0.7)) center / 3px 100% no-repeat !important;
  color: #ffffff !important;
  text-shadow: 0 0 2px #000000, 0 0 3px #000000 !important;
  /* The letter at the top of the cross, just right of its upright arm: off the point, and clear of the line's name,
     which sits level with the point 14 px to either side (.mllabel.right / .left). */
  text-align: left;
  text-indent: calc(50% + 3px);
  line-height: 0 !important;
  padding-top: 0;
  white-space: nowrap;
  overflow: visible;
}
.shmark.mllabel { width: auto; height: 22px; margin: -11px 0 0 0; padding: 0 6px; border-radius: 4px; border: none; background: rgba(120, 40, 190, 0.9); color: #ffffff; font-size: 12px; line-height: 22px; white-space: nowrap; text-shadow: none; }
.shmark.mllabel.right { transform: translateX(14px); }
.shmark.mllabel.left { transform: translateX(calc(-100% - 14px)); }
#sh-align-swap { width: 100%; }
/* The point to take again: ringed on the sheet, lit in the list. */
.shmark.worst { border-color: #ffd23d; box-shadow: 0 0 0 4px rgba(255, 210, 61, 0.55), 0 0 0 7px rgba(16, 24, 32, 0.6); }
#sh-points .item.shpoint.worst { border-color: var(--warn); background: var(--tint-warm-bg); }
/* A fix stood on, where it is in stations (found in use, 70). */
#sh-points .shpoint-sta { display: block; margin-top: 2px; color: var(--dim); font-size: var(--fs-small); }
#sh-points .sh-point-gps { margin-top: 8px; }
#sh-points-map { width: 100%; }
/* A sheet's points on the map, numbered as the editor numbers them: dragged (held first on a touch screen). */
.leaflet-marker-icon.sh-point { touch-action: none; cursor: grab; }
.leaflet-marker-icon.sh-point span { position: absolute; inset: 6px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 3px solid #ffffff; background: #ff5a36; color: #ffffff; font: 700 15px/1 system-ui, sans-serif; box-shadow: 0 0 0 2px #101820; }
.leaflet-marker-icon.sh-point.held { cursor: grabbing; }
.leaflet-marker-icon.sh-point.held span { inset: 0; background: #ffd23d; color: #101820; box-shadow: 0 0 0 3px #101820, 0 4px 12px rgba(0, 0, 0, 0.5); }
/* The job's limits being drawn: each corner a handle a glove can hold (tap it off, drag it), each side a place to tap one in. */
.leaflet-marker-icon.limit-corner { background: none; border: none; touch-action: none; cursor: grab; }
.leaflet-marker-icon.limit-corner span { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #ffd23d; box-shadow: 0 0 0 2px #101820; }
.leaflet-marker-icon.limit-corner.held { cursor: grabbing; }
.leaflet-marker-icon.limit-corner.held span { width: 26px; height: 26px; margin: -13px 0 0 -13px; box-shadow: 0 0 0 3px #101820, 0 4px 12px rgba(0, 0, 0, 0.5); }
.limit-side { cursor: copy; }
/* The lines waiting for their other half: one row of chips, each "C · 15+00 · S-11". */
#sh-line-pair .chip { max-width: 80vw; overflow: hidden; text-overflow: ellipsis; }
/* A match line's row in the editor: Edit and Remove, then Fit when its neighbour is placed. */
.mlrow .row { gap: 8px; margin-top: 8px; align-items: center; }
.mlrow .ml-align { width: 100%; margin-top: 8px; }
/* On the Sheets screen, a pair that does not meet on the ground says so in the warm colour. */
.sheetrow .mlstatus.off { color: var(--tint-warm-ink); font-weight: 600; }
/* "Pair with…" in a line's words, under the sheet and in the Sheets list: a link, not a button's box. */
/* A link in a line of words, a gloved tap tall (design review R1-09). */
.mlpair { display: inline-flex; align-items: center; vertical-align: middle; min-height: var(--glove); margin: 0; padding: 0 2px; border: none; background: none; color: var(--tint-blue-ink); font: inherit; font-weight: 650; text-decoration: underline; cursor: pointer; }
#ml-pair-chips .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* A joined sheet's line: the fixes that place its group, and the one furthest off; warm when that is fair or poor. */
.sheetrow .sheetplaced.off { color: var(--tint-warm-ink); font-weight: 600; }

/* Match lines on the aerial (a boss's check): dashed purple, one label a pair. */
.leaflet-marker-icon.ml-map { background: none; border: none; width: 0; height: 0; }
/* At a desk a paired line's label opens Adjust the join. */
.leaflet-marker-icon.ml-map.opens { cursor: pointer; }
.leaflet-marker-icon.ml-map.structure span { font-style: italic; }
.leaflet-marker-icon.ml-map.opens span:hover { outline: 2px solid #ffffff; }
/* Adjust the join, at a desk: at the head of the side column, its magnifier on the line, its nudges a pad of three. */
.jntool { display: flex; flex-direction: column; gap: 8px; }
.jntool .lbl, .jntool .hint { margin: 0; }
.jnloupe { height: 260px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.jntool .slider { display: flex; align-items: center; gap: 10px; }
.jntool .slider > span { flex: none; width: 52px; color: var(--dim); font-size: 14px; font-weight: 600; }
.jntool .slider input { flex: 1; min-width: 0; padding: 0; border: none; background: none; accent-color: var(--accent); }
.jntool .slider output { flex: none; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.jnpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.jnpad .btn { min-height: 44px; font-size: 20px; line-height: 1; }
.jnreadout { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
/* Under the readout: how the joined sheets' fixes agree with the join as it is now, and the slide they call for. */
.jnfixes { margin: 0; font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.leaflet-marker-icon.ml-map span { display: inline-block; transform: translate(-50%, -50%); padding: 3px 8px; border-radius: 6px; background: rgba(120, 40, 190, 0.92); color: #ffffff; font: 700 12px/1.2 system-ui, sans-serif; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }

/* In the read-only view, a match line's label with a sheet beyond it is a button to that sheet. */
.svml { position: absolute; z-index: 2; min-height: 40px; margin-top: -20px; padding: 0 12px; border: 2px solid #ffffff; border-radius: 8px; background: rgba(120, 40, 190, 0.94); color: #ffffff; font: 700 14px/36px system-ui, sans-serif; white-space: nowrap; pointer-events: auto; cursor: pointer; }
.svml.right { transform: translateX(14px); }
.svml.left { transform: translateX(calc(-100% - 14px)); }

/* Records that share a spot share a dot; its list scrolls rather than hiding any. */
.mappop { max-height: 42vh; overflow-y: auto; }
.maprec { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-top: 1px solid #d6dbe0; }
.maprec:first-of-type { border-top: none; }

/* ─── A sheet, read-only: you are here ─────────────────────────────────── */

#sv-img { display: block; max-width: none; height: auto; }
.svstage { overflow: hidden; }
.svyou { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #4ea1ff; border: 3px solid #ffffff; box-shadow: 0 0 0 2px #1b4f8a; z-index: 3; }
.svacc { position: absolute; border-radius: 50%; background: rgba(78, 161, 255, 0.16); border: 2px solid rgba(78, 161, 255, 0.7); transform: translate(-50%, -50%); z-index: 2; pointer-events: none; }
.svdot { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2px solid #101820; pointer-events: auto; cursor: pointer; z-index: 1; padding: 0; }
.svdot.many { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
/* A dot's hit is a gloved finger's (--glove) round it (design review R1-09). */
.svdot::before { content: ''; position: absolute; left: 50%; top: 50%; width: var(--glove); height: var(--glove); margin: calc(var(--glove) / -2) 0 0 calc(var(--glove) / -2); border-radius: 50%; }
.svedge { position: absolute; transform: translate(-50%, -50%); z-index: 3; display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: #1b4f8a; color: #ffffff; font: 700 13px/1.2 system-ui, sans-serif; white-space: nowrap; line-height: 1.2; }
.svedge .arrow { display: inline-block; font-size: 16px; }
#sv-pick .mappop { color: var(--ink); max-height: none; }
#sv-pick .maprec { border-top-color: var(--line); }
#sv-pick .maprec small { color: var(--dim); }

/* ─── Control lines and stations ───────────────────────────────────────── */

.leaflet-tooltip.hcl-label { background: rgba(16, 24, 32, 0.85); color: #ffd23d; border: 1px solid #ffd23d; border-radius: 6px; font: 700 12px/1.2 system-ui, sans-serif; padding: 2px 6px; box-shadow: none; }
.leaflet-tooltip.hcl-label::before { display: none; }
/* A station along a control line on its dark backdrop, as the line's name has it, so it reads over any imagery (design
   review R4-03). */
.leaflet-tooltip.hcl-tick { background: rgba(16, 24, 32, 0.85); border: none; border-radius: 4px; box-shadow: none; color: #ffffff; font: 600 12px/1.2 system-ui, sans-serif; text-shadow: none; padding: 1px 4px; }
.leaflet-tooltip.hcl-tick::before { display: none; }
/* The stations along a control line are named close in only: from zoom 17, as the markers are. */
.leaflet-container:not(.near) .leaflet-tooltip.hcl-tick { display: none; }
.item.hclrow .points { display: flex; flex-direction: column; gap: 4px; }
.item.hclrow > details.fold { margin-top: 2px; }
.item.hclrow .hcl-mon { display: flex; flex-direction: column; gap: 2px; }
.item.hclrow .hcl-mon .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.item.hclrow .hcl-mon-words { display: flex; flex-direction: column; min-width: 0; }
.item.hclrow .hcl-stand-said { margin: 0; font-weight: 700; color: var(--tint-warm-ink); }
.item.hclrow .hcl-stand-said.ok { color: var(--ink); }
.item.hclrow .hcl-stand .hint { margin: 0; }
.item.hclrow .pt { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }
.item.hclrow .rename { display: flex; gap: 6px; margin-top: 6px; }
.item.hclrow .rename input { min-height: 40px; }

/* On a sheet: station marks are flags, not the round alignment points. */
.shmark.stmark { border-radius: 4px; border-color: #ffd23d; background: rgba(255, 210, 61, 0.35); width: auto; min-width: 24px; height: 22px; margin: -11px 0 0 -12px; padding: 0 4px; white-space: nowrap; font-size: 12px; line-height: 16px; color: #101820; text-shadow: none; }
/* Item 92: a station mark is a tick across its line with its station by it; the line's name once (src/map.js drawStationMarks). */
.shmark.stmark.stat, .shmark.stname { width: 0; height: 0; min-width: 0; margin: 0; padding: 0; border: none; border-radius: 0; background: none; }
.shmark.stmark.stat .sttick { position: absolute; left: -1.5px; top: -8px; width: 3px; height: 16px; border-radius: 1px; background: #ffd23d; box-shadow: 0 0 0 1px #101820; }
.shmark.stmark.stat .ststa, .shmark.stname .stname-text { position: absolute; transform: translate(-50%, -50%); padding: 0 2px; border-radius: 3px; white-space: nowrap; font: 700 11px/15px system-ui, sans-serif; color: #101820; text-shadow: none; }
.shmark.stmark.stat .ststa { background: rgba(255, 210, 61, 0.92); }
.shmark.stmark.stat.quiet .ststa { visibility: hidden; }
/* Item 142: the ticks a stack verdict names, lit when its repair button opened the sheet (src/map.js stOffLit). */
.shmark.stmark.stat.st-off .sttick { background: #dc2626; width: 5px; left: -2.5px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #dc2626; }
.shmark.stmark.stat.st-off .ststa { background: #dc2626; color: #fff; visibility: visible; }
#sh-marks-list .item.st-off { border-left: 4px solid #dc2626; }
.shmark.stname .stname-text { background: rgba(16, 24, 32, 0.85); color: #ffd23d; font-size: 12px; line-height: 17px; padding: 0 5px; }
.chip.kind { min-height: 30px; padding: 4px 10px; font-size: 12px; }

/* The flip view: a station line down a profile, a ring on a section. */
.svline { position: absolute; top: 0; bottom: 0; width: 0; border-left: 3px solid #4ea1ff; z-index: 3; pointer-events: none; }
.svline span { position: absolute; top: 6px; left: 4px; background: #1b4f8a; color: #fff; font: 700 12px/1.2 system-ui, sans-serif; padding: 2px 6px; border-radius: 999px; white-space: nowrap; }
.svring { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 4px solid #4ea1ff; box-shadow: 0 0 0 4px rgba(78, 161, 255, 0.35); z-index: 3; pointer-events: none; }
.svring span { position: absolute; top: 46px; left: 50%; transform: translateX(-50%); background: #1b4f8a; color: #fff; font: 700 12px/1.2 system-ui, sans-serif; padding: 2px 6px; border-radius: 999px; white-space: nowrap; }

/* ─── The SWMP site map, at a desk: its controls beside the pages, each page 11×17 as it prints ─── */

/* A site feature being drawn on the map: the count, its options, Undo, Cancel, Save. */
.annotbar { align-items: center; flex-wrap: wrap; gap: 8px; }
.annotbar #map-annot-count { flex: 1 1 160px; }
.annotbar #map-annot-label { flex: 1 1 180px; min-height: 40px; }
.annotbar .annotfield { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); }
.annotbar .annotfield input { width: 76px; min-height: 40px; }

html.wide #screen-map.sitemap-open { display: block !important; }
html.wide #screen-map.sitemap-open > :is(.mapmain, .mapside) { display: none !important; }
/* Line up the sheets (#screen-assembly): over the map screen at a desk, as the site map is; the side column, then the white board. */
html.wide #screen-map.assembly-open { display: block !important; }
html.wide #screen-map.assembly-open > :is(.mapmain, .mapside, #swmp-map) { display: none !important; }
html.wide #screen-assembly:not([hidden]) { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.asm-side { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.asm-side .head { margin: 0; }
/* The status a line each (found in use, 64): the seams' word, the sheets not tied in, the ones on the ground. */
#asm-status .asm-said { display: block; }
/* Found in use, 43: no jumble of buttons. ‹ Map, the title and the board's ⋯ on one row; Hold, Trust and the sheet's ⋯
   on one; Blink, Accept the misfit and Close on one; a seam row's tools on one, aligned; Pair again at the end of the
   pairs' one line; the lists at the foot closed folds. */
.asm-head { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.asm-head .head { flex: 1; min-width: 0; }
.asm-pick-row, .asm-look-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
.asm-pick-row > .btn, .asm-look-row > .btn { flex: 1 1 auto; padding-inline: 8px; font-size: 14px; white-space: nowrap; }
.asm-look-row > #asm-look-close { flex: none; }
.asm-pick-row > details.menu > summary { min-width: 36px; min-height: var(--tap-row); padding: 0 4px; }
#asm-pick-menu:not(:has(#asm-pick-tools > *)) { display: none; }
/* The side scrolls and Undo / Save are pinned at its foot: the sheet's ⋯ opens upward, over its own panel. */
#asm-pick-menu > .menubody { top: auto; bottom: calc(100% + 4px); }
.menubody .asm-tools { flex-direction: column; gap: var(--g-1); }
.menubody .asm-tools .btn { justify-content: flex-start; width: 100%; border-color: transparent; background: none; color: var(--ink); text-align: left; }
.asm-look-row .toggle { min-height: var(--tap-row); }
#asm-look .slider { display: flex; align-items: center; gap: 10px; }
#asm-look .slider > span { flex: none; color: var(--dim); font-size: 14px; font-weight: 600; }
#asm-look .slider input { flex: 1; min-width: 0; padding: 0; border: none; background: none; accent-color: var(--accent); }
#asm-look .slider output { flex: none; min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.asm-mp-head { display: flex; align-items: center; gap: 6px; }
.asm-mp-head > .mp-sum { flex: 1; min-width: 0; margin: 0; }
.asm-mp-head > #asm-mp-again { flex: none; }
.asm-side > :is(#asm-loose-fold, #asm-discrepancies) { flex: 0 0 auto; }
#asm-ground-box > #asm-ground-back { align-self: flex-start; margin-bottom: 4px; }
.asm-board { position: relative; height: calc(100dvh - 96px); min-height: 480px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #ffffff; }
/* Found in use, 39: a section's match lines paired at the side (src/matchpairs.js, host board); the button pinned on
   top; a set that wants reading again says so over the board, in place of it when none of it can be paired. */
.asm-mp:not([hidden]) { display: flex; flex-direction: column; gap: 8px; }
.asm-side .asm-mp .mp-go { top: -1px; margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.asm-reread:not([hidden]) { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 1000; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 10px; background: var(--panel); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
.asm-reread.all:not([hidden]) { inset: 0; flex-direction: column; justify-content: center; border: 0; border-radius: 0; box-shadow: none; }
.asm-reread .mp-reread-line { margin: 0; font-weight: 650; }
.asm-side > .asm-saverow { position: sticky; bottom: 0; z-index: 1; margin-top: auto; padding: 8px 0 4px; border-top: 1px solid var(--line); background: var(--bg); }
.asm-review:not([open]) { flex: 0 0 auto; }
#asm-pick-tools:empty { display: none; }

#asm-canvas { width: 100%; height: 100%; background: #ffffff; }
.asm-loupe { height: 240px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #ffffff; }
.steer.asm-fine { border-color: var(--ok); }
.steer.asm-look { border-color: var(--warn); }
.steer.asm-wrong { border-color: var(--danger); }
/* Each sheet's outline over it: picked in the accent and thick, held dashed blue (it drags), loose dotted amber. */
#screen-assembly path.asm-sheet { stroke: #475569; }
#screen-assembly path.asm-sheet.picked { stroke: #f08a24; }
#screen-assembly path.asm-sheet.held { stroke: #1d4ed8; stroke-dasharray: 10 5; cursor: grab; }
#screen-assembly path.asm-sheet.loose { stroke: #b45309; stroke-dasharray: 3 5; }
/* Seams and straight lines by their feet: 2 ft or under green, to 5 amber, past 5 red; grey with no scale yet, or let go. */
#screen-assembly path.fine { stroke: #15803d; }
#screen-assembly path.look { stroke: #d97706; }
#screen-assembly path.wrong { stroke: #dc2626; }
#screen-assembly path.noscale { stroke: #64748b; }
#screen-assembly path.let { stroke: #9ca3af; stroke-dasharray: 4 5; }
.asm-seam-mark, .asm-line-mark, .asm-name-mark, .asm-loose-mark { background: none; border: none; }
.asm-seam { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; transform: translate(-50%, -50%); padding: 4px 7px; border: 2px solid #64748b; border-radius: 7px; background: rgba(255, 255, 255, 0.95); color: #101820; font: 600 12px/1.3 system-ui, sans-serif; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.asm-seam.fine { border-color: #15803d; }
.asm-seam.look { border-color: #d97706; }
.asm-seam.wrong { border-color: #dc2626; }
.asm-seam.let { border-color: #9ca3af; border-style: dashed; color: #475569; }
.asm-seam.picked { box-shadow: 0 0 0 3px #f08a24; }
.asm-seam:not(.picked) { flex-direction: row; align-items: baseline; gap: 6px; padding: 2px 7px; }
.asm-seam-off { font-size: 14px; font-weight: 750; }
.asm-seam-tag { font-weight: 600; color: #7c2d12; }
.asm-seam-note { font-weight: 500; }
.asm-release { margin-top: 2px; padding: 1px 0; border: none; background: none; color: #1d4ed8; font: inherit; font-weight: 650; text-decoration: underline; cursor: pointer; }
.asm-line { transform: translate(8px, -50%); padding: 2px 6px; border: 1px dashed #64748b; border-radius: 5px; background: rgba(255, 255, 255, 0.92); color: #101820; font: 600 12px/1.3 system-ui, sans-serif; white-space: nowrap; }
.asm-name { display: inline-block; transform: translate(4px, 4px); padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.9); color: #334155; font: 700 12px/1.3 system-ui, sans-serif; white-space: nowrap; }
.asm-name.held { color: #1d4ed8; }
.asm-loose-why { transform: translate(-50%, -50%); width: max-content; max-width: 260px; padding: 4px 8px; border: 1px solid #b45309; border-radius: 6px; background: rgba(255, 247, 237, 0.95); color: #7c2d12; font: 500 12px/1.3 system-ui, sans-serif; }
/* The ground step: the aerial in the board's place; each fix an arrow from where the sheets put its spot to where it was taken. */
#asm-map { width: 100%; height: 100%; }
#screen-assembly path.asm-fix-arrow { stroke-linecap: round; }
#screen-assembly path.asm-fix-arrow.fine, #screen-assembly path.asm-fix.fine { stroke: #22c55e; }
#screen-assembly path.asm-fix-arrow.look, #screen-assembly path.asm-fix.look { stroke: #f59e0b; }
#screen-assembly path.asm-fix-arrow.wrong, #screen-assembly path.asm-fix.wrong { stroke: #ef4444; }
#screen-assembly path.asm-fix { fill: #ffffff; fill-opacity: 1; stroke-width: 3; }
#screen-assembly path.asm-fix-at { stroke: #ffffff; stroke-width: 1.5; fill: #101820; fill-opacity: 1; }
.asm-fix-mark { background: none; border: none; }
.asm-fix-off { display: inline-block; transform: translate(9px, -50%); padding: 1px 5px; border-radius: 4px; background: rgba(16, 24, 32, 0.82); color: #ffffff; font: 700 12px/1.3 system-ui, sans-serif; white-space: nowrap; }
.asm-fix-off.look { color: #fbbf24; }
.asm-fix-off.wrong { color: #fca5a5; }
.asm-pull .meta.off { color: var(--tint-warm-ink); font-weight: 600; }
.asm-pull .asm-own { margin-top: 4px; }
/* The chips for what a point's spot is on, over I'm standing on it. */
.shonlbl { margin: 4px 0 0; }
#sh-on { margin: 4px 0 8px; }
html.wide #swmp-map:not([hidden]) { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; }
html.wide .sm-side { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
html.wide .sm-side .head { margin: 0; }
html.wide .sm-side > #sm-close { align-self: flex-start; }
html.wide .sm-side .steer { font-size: 16px; padding: 10px; }
html.wide .sm-side .lbl { margin: 8px 0 0; }
html.wide .sm-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
html.wide .sm-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--dim); }
html.wide .sm-field :is(input, select) { min-height: 40px; }
html.wide .sm-basechips { display: flex; flex-direction: column; gap: 6px; }
html.wide .sm-division { display: flex; flex-direction: column; gap: 4px; }
html.wide .sm-division-name { font-size: 12px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.04em; }
html.wide .sm-division .chips { flex-wrap: wrap; }
html.wide .sm-annot { align-items: center; gap: 6px; font-size: 14px; }
html.wide .sm-saved { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
html.wide .sm-saved-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
html.wide .sm-saved-row .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html.wide .sm-saved-row .sm-hash { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
html.wide .sm-pages { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* A page: 17 × 11 of white paper; the base canvas under the frame, the SVG over all of it. */
.sm-page { position: relative; width: 100%; aspect-ratio: 17 / 11; background: #ffffff; color: #101820; overflow: hidden; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35); }
.sm-page > .sm-base { position: absolute; left: calc(27 / 1224 * 100%); top: calc(27 / 792 * 100%); width: calc(920 / 1224 * 100%); height: calc(738 / 792 * 100%); }
.sm-page > .sm-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sm-page-map { cursor: grab; touch-action: none; }
.sm-page-map.dragging { cursor: grabbing; }

@media print {
  /* Printed from the site map: its pages alone, each an 11×17 landscape sheet edge to edge. */
  @page swmpmap { size: 17in 11in; margin: 0; }
  html[data-print="swmp-map"] body { page: swmpmap; margin: 0 !important; padding: 0 !important; }
  html[data-print="swmp-map"] main > :not(#screen-map) { display: none !important; }
  html[data-print="swmp-map"] #screen-map { display: block !important; padding: 0 !important; margin: 0 !important; }
  html[data-print="swmp-map"] #screen-map > :not(#swmp-map) { display: none !important; }
  html[data-print="swmp-map"] #swmp-map { display: block !important; margin: 0 !important; padding: 0 !important; }
  html[data-print="swmp-map"] #swmp-map > :not(#sm-pages) { display: none !important; }
  html[data-print="swmp-map"] #sm-pages { display: block !important; }
  html[data-print="swmp-map"] .sm-page { width: 17in !important; height: 11in !important; aspect-ratio: auto; margin: 0 !important; box-shadow: none !important; break-after: page; break-inside: avoid; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  html[data-print="swmp-map"] .sm-page:last-child { break-after: auto; }
}

/* Layers of one view on the sheet screen: the sheets over the same stations, each name laying that sheet over this one;
   Same view as…, the two spots on each sheet, and the overlay with its blend, blink and Confirm. */
.shlayers { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.shlayers .steer, .shlayers .lbl, .shlayers .hint { margin: 0; }
.shover { display: flex; flex-direction: column; gap: 4px; }
/* The sheet screen's folds (item 29): one line each when closed. */
#screen-sheet details.shfold { margin: 0; border-top: 1px solid var(--line); }
#screen-sheet details.shfold[hidden] { display: none; }
#screen-sheet details.shfold > summary { margin: 0; padding: 0; }
#screen-sheet details.shfold > .foldbody > .lbl:first-child { margin-top: 0; }
/* More than six station marks (item 92): their list in a fold of its own, shut, its one line saying the line and the range. */
#screen-sheet details.shmarksfold { margin: 0; }
#screen-sheet details.shmarksfold[hidden] { display: none; }
#screen-sheet details.shmarksfold > summary { margin: 0; padding: 0 var(--g-2); border: 1px solid var(--line); border-radius: 8px; }
#screen-sheet details.shmarksfold > summary > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
#screen-sheet details.shmarksfold[open] > .list { margin-top: var(--g-2); }
/* The sheet's Name, Kind, Layer and Stations (found in use, 28, round 2): each label beside its field, one 32 px row a
   field, in half the height a label row over a field took; the rest of the fold full width under them. On a phone
   and at a desk. */
:root[data-density="fine"] #screen-sheet :is(#sh-fold-details, #sh-fold-stations) > .foldbody { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: var(--g-3); row-gap: var(--g-2); align-items: center; }
:root[data-density="fine"] #screen-sheet :is(#sh-fold-details, #sh-fold-stations) > .foldbody > * { grid-column: 1 / -1; margin-top: 0; margin-bottom: 0; }
:root[data-density="fine"] #screen-sheet :is(#sh-fold-details, #sh-fold-stations) > .foldbody > label.lbl { grid-column: 1; }
:root[data-density="fine"] #screen-sheet :is(#sh-fold-details, #sh-fold-stations) > .foldbody > label.lbl + :is(input, select, .row) { grid-column: 2; }
/* At a desk the folds are the phone's, each its line (found-in-use item 40); Save sheet pinned at the column's foot, so a
   long column never puts it out of sight. */
html.wide #screen-sheet .shside > .actionbar { position: sticky; bottom: 0; z-index: 3; margin: var(--g-2) 0 0; padding: var(--g-2) 0 var(--g-3); background: var(--bg); border-top: 1px solid var(--line-strong); }
html.wide #screen-sheet .shside > .actionbar > .btn.primary { flex: 1; }
/* On a phone, + and − over the sheet's top corner (item 29); pinch zooms as ever. */
html:not(.wide) #screen-sheet .shzoom { position: relative; z-index: 3; height: 0; margin: 0; justify-content: flex-end; align-items: flex-start; padding-right: 8px; }
html:not(.wide) #screen-sheet .shzoom .btn { transform: translateY(16px); background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); font-size: 22px; font-weight: 700; }
.shover-sec { display: flex; flex-direction: column; gap: 2px; }
.shover-sec + .shover-sec { margin-top: 6px; }
.shover .shover-head { margin: 0; }
.shover-line { margin: 0; line-height: 1.6; }
/* A link in a line of words, a gloved tap tall (design review R1-09). */
.shlayer { display: inline-flex; align-items: center; vertical-align: middle; min-height: var(--glove); padding: 0 2px; border: none; background: none; color: var(--accent); font: inherit; font-weight: 650; text-decoration: underline; cursor: pointer; }
#sh-sameview, #sh-sameview-all { width: 100%; min-height: 40px; }
#sh-sameview-more { align-self: flex-start; min-height: 44px; }
#sh-other-img { display: block; max-width: none; height: auto; cursor: crosshair; }
.shoverlay { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.shoverlay img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
#sh-look .slider { display: flex; align-items: center; gap: 10px; }
#sh-look .slider > span { flex: none; width: 52px; color: var(--dim); font-size: 14px; font-weight: 600; }
#sh-look .slider input { flex: 1; min-width: 0; padding: 0; border: none; background: none; accent-color: var(--accent); }
#sh-look .slider output { flex: none; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
#sh-look .hint { margin: 0; }
.shmark.spot2 { border-color: #16a34a; background: rgba(22, 163, 74, 0.35); }
/* Same spots: dotted rings numbered 1 and 2, a dotted thread between them, the pair's name by the first. */
.shmark.tie { border-style: dotted; border-color: #b44dff; background: rgba(180, 77, 255, 0.18); }
.shmark.tie.pending { border-color: #4ea1ff; background: rgba(78, 161, 255, 0.25); }
.shmark.mllabel.tie { border: none; background: rgba(90, 30, 150, 0.9); }
.mllayer line.tie { stroke-width: 2; stroke-dasharray: 2 6; }
.mllayer line.tie.pending { stroke: #4ea1ff; }
/* The scale bar: a solid line along the printed bar, its ends, its length by it. */
.mllayer line.bar { stroke: #0284c7; stroke-width: 4; stroke-dasharray: none; }
.mllayer line.bar.pending { stroke: #4ea1ff; }
.shmark.barend { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-width: 2px; border-color: #0284c7; background: rgba(2, 132, 199, 0.35); }
.shmark.barend.pending { border-color: #4ea1ff; }
.shmark.barlabel { width: auto; height: 20px; margin: -26px 0 0 0; padding: 0 6px; border: none; border-radius: 4px; background: rgba(3, 105, 161, 0.92); transform: translateX(-50%); font-size: 12px; line-height: 20px; white-space: nowrap; text-shadow: none; }
.leaflet-marker-icon.ml-map.tie span { background: rgba(90, 30, 150, 0.85); font-weight: 600; }

/* The board: a view in layers stacked behind its outline and counted by its name; same spots twin to twin, dotted; a
   seam with a verdict in a heavier pill; the loops under the status; accepting a misfit; the plan discrepancies. */
#screen-assembly path.asm-stack { stroke: #94a3b8; }
/* The fit review: a row a sheet, its word coloured as the Sheets rows colour a fit, the flagged ones edged. */
.asm-review { flex: 0 0 auto; }
.asm-review > .list { margin-bottom: var(--g-2); }
.asm-review-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.asm-review-row.flagged { border-left: 4px solid var(--warn); }
.asm-review-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asm-review-word { font-weight: 700; }
.asm-review-facts { grid-column: 1 / -1; color: var(--dim); }
.asm-review-row.level-good .asm-review-word { color: var(--tint-green-ink); }
.asm-review-row.level-fair .asm-review-word { color: var(--tint-warm-ink); }
.asm-review-row:is(.level-poor, .level-does-not-fit) .asm-review-word { color: var(--tint-red-ink); }
.asm-review-row:is(.level-unchecked, .level-not-placed, .level-loose) .asm-review-word { color: var(--dim); }
/* A layer that does not fit its stack: its outline dashed in the warning colour, and why beside it. */
#screen-assembly path.asm-stack-off { stroke: #c2410c; stroke-dasharray: 8 5; }
.asm-stack-off-name { display: inline-block; transform: translate(-100%, -120%); width: max-content; max-width: 280px; padding: 2px 6px; border: 1px solid #c2410c; border-radius: 4px; background: rgba(255, 247, 237, 0.95); color: #9a3412; font: 700 12px/1.3 system-ui, sans-serif; }
/* A sheet's stations on its screen: the range, and the line when the job has more than one. */
.shstations { gap: 8px; }
.shstations #sh-stations { flex: 1 1 auto; min-width: 0; }
.shstations #sh-stations-hcl { flex: 0 1 40%; min-width: 0; }
#sh-stack-off { gap: 8px; margin: -4px 0 8px; }
/* Item 142: a stack verdict's repair buttons (src/map.js stackFixButtons): on the card in its row, on the board a row a sheet. */
.st-fix-host { display: contents; }
.st-fix-rows { display: grid; gap: 6px; margin: 4px 0 8px; }
.st-fix-rows[hidden] { display: none; }
.st-fix-row { gap: 8px; align-items: center; flex-wrap: wrap; }
.asm-layer.off { border-color: #c2410c; color: #9a3412; }
/* A plan set's pages offered as a stack (askStacks): one question over the foot of the screen, Yes or No. */
.stackask { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200; max-width: 560px; margin: 0 auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); }
.stackask[hidden] { display: none; }
.stackask .stackq { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.35; }
.stackask .hint { margin: 0; }
.stackask .row { justify-content: flex-end; gap: 10px; }
#screen-assembly path.asm-stack.s1 { transform: translate(5px, -5px); }
#screen-assembly path.asm-stack.s2 { transform: translate(10px, -10px); }
.asm-layers { display: inline-block; padding: 0 5px; border-radius: 8px; background: #334155; color: #ffffff; font-size: 12px; font-weight: 700; }
#screen-assembly path.asm-tie-spot { fill: none; }
.asm-seam.verdict { border-width: 3px; border-color: #b91c1c; background: #fff5f5; }
.asm-seam-verdict { font-weight: 750; color: #b91c1c; }
.asm-seam:not(.picked) .asm-seam-verdict::before { content: '· '; color: #101820; font-weight: 600; }
.asm-loop.look { color: var(--tint-warm-ink); font-weight: 600; }
.asm-loop.wrong { color: var(--danger); font-weight: 600; }
#asm-bars { margin: 0; }
.asm-accept, .asm-callout { display: flex; flex-direction: column; gap: 6px; }
.asm-accept .lbl, .asm-callout .lbl { margin: 0; }
.asm-accept .asm-kind { justify-content: flex-start; min-height: 40px; text-align: left; white-space: normal; line-height: 1.25; }
.asm-c-sheet { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-top: 1px solid var(--line); }
.asm-c-name { margin: 0; font-weight: 700; }
.asm-c-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.asm-callout > .asm-c-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.asm-c-grid label, .asm-c-field, .asm-disc-field { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--dim); }
.asm-c-grid input, .asm-c-field :is(input, textarea), .asm-disc-field :is(input, textarea, select) { min-width: 0; min-height: 36px; font-size: 14px; }
.asm-discs { display: flex; flex-direction: column; gap: 6px; }
.asm-discs > .lbl { margin: 6px 0 0; }
.asm-disc { display: flex; flex-direction: column; gap: 4px; }
.asm-disc .meta { margin: 0; }
.asm-disc-status.open { background: var(--tint-warm-bg); color: var(--tint-warm-ink); }
.asm-disc-status.answered { background: var(--tint-blue-bg); color: var(--tint-blue-ink); }
.asm-disc-status.resolved { background: var(--line); color: var(--dim); }
.asm-disc .asm-disc-due { color: var(--danger); font-weight: 650; }
.asm-disc-unsaved { font-style: italic; }
.asm-disc-snap { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #ffffff; }
.asm-disc-more > summary { cursor: pointer; color: var(--accent); font-weight: 650; }
.asm-disc-more[open] { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.asm-disc-save { align-self: flex-start; }

/* The Plans block under the map: This sheet and Put sheets on the map (item 38). */
.sheetsbox .sheetsboxacts { gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.sheetsbox .sheetsboxacts .topick { margin-top: 0; }
#map-this-sheet:disabled { opacity: 0.55; }
/* Invert lines and Match lines: a phone's toggles beside Labels (item 31), a desk's boxes under White. */
html.wide .maptoggles .phoneonly { display: none; }
html:not(.wide) .mapctl .ctlchecks { display: none; }
/* The work list at a desk, in folds: a kind, then a walk or a list, then its items; 44 px rows. */
.maplist .maplistfold { margin: 0; }
.maplist .maplistfold > summary { min-height: 44px; font-size: 15px; }
.maplist .maplistfold .maplistfold { margin-left: 12px; }
.maplist .maplistfold .maplistfold > summary { font-weight: 650; }
.maplist .tmrow { min-height: 44px; }

/* The control lines read off a sheet's page (P5c, src/map.js drawHclLines): a colour a line, its stations dotted; a swipe traced. */
.hcllayer polyline { fill: none; }
.hcllayer polyline.hcl { stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }
.hcllayer polyline.hcl.done { opacity: 0.3; }
.hcllayer polyline.swipe { stroke: #ffd23d; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }
.hcllayer.tracing { pointer-events: auto; touch-action: none; cursor: crosshair; }
/* The space bar held over a drawing, or a middle drag under way: a hand, for the left button moves it (item 48, src/lib/dragpan.js). */
html.spacepan :is(.sheetview, .leaflet-container), html.spacepan :is(.sheetview, .leaflet-container) * { cursor: grab; }
.sheetview.panning, .sheetview.panning * { cursor: grabbing; }
.hcllayer .c0, .shmark.hcltick.c0 { stroke: #ff3df5; border-color: #ff3df5; }
.hcllayer .c1, .shmark.hcltick.c1 { stroke: #00c2b2; border-color: #00c2b2; }
.hcllayer .c2, .shmark.hcltick.c2 { stroke: #ff7a00; border-color: #ff7a00; }
.hcllayer .c3, .shmark.hcltick.c3 { stroke: #3d7bff; border-color: #3d7bff; }
.shmark.hcltick { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-width: 3px; background: #ffffff; }
.shmark.hcltick.notick { border-style: dashed; background: transparent; }
/* The match line's station at a line's end (P17): a short bar across the line, turned with it, not a dot. */
.shmark.hcltick.matchend { width: 0; height: 18px; margin: -9px 0 0 -2px; border-width: 0 0 0 4px; border-radius: 2px; background: transparent; transform-origin: 2px 9px; }
.shhclbox { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
/* Item 137: which line a trace is of, and that line said above the sheet while it is traced. */
.shtracepick { display: flex; flex-direction: column; gap: 6px; }
.shtracepick select { width: 100%; min-height: 40px; font-size: 16px; }
.shtracebanner { margin: 4px 0; font-weight: 600; }
.shtracebar { align-items: center; gap: 8px; flex-wrap: wrap; }
.shtracebar[hidden], .shleaveask[hidden] { display: none; }
.shhcl-which-row { gap: 6px; margin: 6px 0; }
.shhcl-which-row select { flex: 1 1 12em; min-width: 0; }
.shhcl-trace-said { margin: 4px 0 0; font-weight: 600; }
/* Item 95: the page read again from its PDF, with Stop; how current its lines are after. */
.shhclreading, .shhclfresh { align-items: center; gap: 8px; }
.shhclreading .steer, .shhclfresh .hint { margin: 0; }
.shhclreading .steer { padding: 8px 10px; font-size: 15px; }
/* Brought into sight as a read starts (src/map.js mlWordsReading): clear of the bar at a phone's foot. */
#sh-ml-reading { scroll-margin-bottom: calc(var(--actionbar-h, 0px) + 12px); }
/* Item 96: the control lines kept on a sheet, drawn from saved data (src/map.js drawSheetSegments): a thin line its colour,
   its name once beside it; a list row each, folded. */
.seglayer { pointer-events: none; }
.seglayer polyline { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.95; }
.seglayer polyline.check { stroke-dasharray: 6 4; }
.seglayer polyline.sel { stroke-width: 5; }
.seglayer .c0 { stroke: #ff3df5; fill: #ff3df5; }
.seglayer .c1 { stroke: #00c2b2; fill: #00c2b2; }
.seglayer .c2 { stroke: #ff7a00; fill: #ff7a00; }
.seglayer .c3 { stroke: #3d7bff; fill: #3d7bff; }
/* Sized in the sheet's pixels by drawSheetSegments (font-size, stroke-width attributes), so no px size here. */
.seglayer text { stroke: #ffffff; paint-order: stroke; font-weight: 700; font-family: system-ui, sans-serif; }
.shsegs { margin-top: 12px; }
.shseg-row .top { align-items: center; gap: 8px; }
.shseg-row .row { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.shseg-row .shseg-name { width: 100%; margin: 6px 0 0; }
.shseg-row.check .code { font-style: italic; }
#sh-seg-history-list { margin: 2px 0 4px; padding-left: 18px; }
.leaflet-overlay-pane path.mapseg { stroke-width: 2.5; }
.shhcl-row .top { align-items: center; gap: 8px; }
.shhcl-row.done .code { opacity: 0.7; }
.shhcl-row .shhcl-name { width: 100%; margin: 6px 0; }
/* A line read leads with its count and next step; how sure and why in a closed one-line fold (found in use, 69). */
.shhcl-lead { margin: 4px 0 0; font-weight: 600; }
.shhcl-why { margin: 2px 0 0; color: var(--dim); font-size: 13px; }
.shhcl-why > summary { cursor: pointer; padding: 4px 0; }
.shhcl-why > ul { margin: 2px 0 4px; padding-left: 18px; }
.shhcl-debug { margin: 2px 0 0; color: var(--dim); font-size: 12px; }
.shhcl-debug > summary { cursor: pointer; padding: 4px 0; }
.shhcl-debug > p { margin: 2px 0 4px; overflow-wrap: anywhere; }
.hclswatch { display: inline-block; flex: none; width: 18px; height: 6px; border-radius: 3px; }
.hclswatch.c0 { background: #ff3df5; }
.hclswatch.c1 { background: #00c2b2; }
.hclswatch.c2 { background: #ff7a00; }
.hclswatch.c3 { background: #3d7bff; }
/* A section's control lines on the plan set (P5c per section, plansets.js renderSecLines): a block a page. */
.ps-lineup-row { flex-wrap: wrap; }
.ps-hclsec { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 12px; }
.ps-hcl-head { align-items: center; gap: 8px; }
.ps-hclpage { display: flex; flex-direction: column; gap: 6px; padding-left: 10px; border-left: 3px solid var(--line, #d6d6d6); }
.ps-hclpage .lbl { margin: 0; }
.ps-hclrow .top { align-items: center; gap: 8px; }
.ps-hclrow.done .code { opacity: 0.6; }
.ps-hcl-marked { align-self: center; }

/* Line up the sheets in use (item 21): By section | By station, the picked sheet's toolbar, a view's stack list. */
.asm-side > :is(#asm-by, #asm-sections, #asm-station-box) { flex: 0 0 auto; }
#asm-by { margin: 0; }
.asm-sections, .asm-stack { display: grid; gap: 4px; }
.asm-sec, .asm-stack-row { width: 100%; min-height: var(--tap-row); padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.asm-sec.on, .asm-stack-row.on { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); font-weight: 700; }
.asm-station .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.asm-station #asm-station { width: 7em; }
.asm-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.asm-tools .btn { min-width: 0; padding-inline: 4px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menubody .asm-tools { display: flex; }
.menubody .asm-tools .btn { font-size: inherit; padding-inline: var(--pad-x); overflow: visible; }
button.asm-layers { border: 0; font-family: inherit; line-height: inherit; cursor: pointer; pointer-events: auto; }
.asm-pick-layers { display: block; width: 100%; text-align: left; white-space: normal; }
.asm-layer-list { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.asm-layer-list .asm-layer.on { font-weight: 700; text-decoration: underline; }

/* Tidy lines (item 99): Merge the ticked on top, a row a proposal, its tick at the left of its words. */
.hcltidy .foldbody > .btn { width: 100%; }
.hcltidyrow { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.hcltidyrow input[type="checkbox"] { flex: none; width: 22px; height: 22px; margin: 2px 0 0; }
.hcltidy-group { margin-top: 14px; }
.hcltidy-head { margin: 0 0 4px; font-weight: 600; }

/* Item 105: the sheet's Crop fold. While it is open, what the map lets go of the sheet is dimmed on it, the kept edge
   drawn; a seam's Flip side and a sheet end's Crop here show pressed when on. Rows stay one line on a 390 px phone. */
.mllayer .cropdim { fill: rgba(16, 20, 26, 0.55); }
.mllayer .cropedge { fill: none; stroke: #ffd23d; stroke-width: 3; }
/* Hide area's first corner, until the opposite one is tapped (item 110). */
.mllayer .cropstart { fill: #ffd23d; stroke: #10141a; stroke-width: 2; vector-effect: non-scaling-stroke; }
.shcroprow .top { display: flex; align-items: center; gap: 8px; }
.shcroprow .top .code { min-width: 0; overflow-wrap: anywhere; }
.shcroprow .btn { flex: none; min-height: 44px; }
.shcroprow .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#sh-crop-show[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Item 129: the sheet card's Put it back, Start this sheet over and its changes, and Add plans' foot folds. */
.shredo { display: flex; flex-direction: column; align-items: flex-start; gap: var(--gap-s, 8px); margin-top: var(--gap-m, 12px); }
.shredo > .fold, .apfoot > .fold { align-self: stretch; }
.apfoot { display: flex; flex-direction: column; gap: var(--gap-s, 8px); margin-top: var(--gap-m, 12px); }
.ap-redo-row, .ap-read-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ap-redo-row > .meta, .ap-read-row > .meta { flex: 1 1 12em; margin: 0; }
