Part of [Design system](https://docs.mapcairn.com/design.md), which is built from [DESIGN.md](https://github.com/MapCairn/mapcairn/blob/main/DESIGN.md) in the repository, where it is edited.

| Component                              | Contract                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `FeatureCard`                          | An article named by its heading, which takes focus when a tap on the map opened it. Shows the layer, the colour's words with its glyph, the title and template lines; host-keyed templates follow the active message catalogue. It also shows an `https` provider link that says it opens in a new tab, the disclaimer, "Show on map" and, for layers with a detail source, "Show affected area" with its cost, "Hide affected area" once shown and Try again on failure. Close is an icon button named "Close card". A feature found by a tap on a raster layer has no style, so its card leaves out the glyph and the colour's words, and has no affected area; the rest is the same.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `DrawToolbar`                          | A landmark named "Drawing" holding a toolbar named "Draw". A radio group "Shape to draw" (Point, Line, Polygon, Circle), a readout (the shape's name and its measures, such as "Polygon 1, 3 points" and "6.9 ha · 1.21 km", with the name on one line and the measures on the line below, both reserved from the start, so the toolbar and the bottom slots above it do not move when the first measure appears, whatever the language or text size, unless a single measure is wider than the toolbar and wraps), a refusal or warning with an icon, and a row of buttons: Add point at map centre (Move point to map centre while a point is selected), Undo, Redo, Cancel shape or Delete shape (one button, disabled when neither applies), Shapes and export, and Finish or Done (one button, with a check mark in both states and as wide as the longer of its two labels, so the toolbar keeps its height when the label changes at the first point, in either language and with text at 150 percent). A fieldset named by the selected shape holds Previous point, Next point, Add point after this one at map centre and Remove point, and for a circle Smaller radius, Larger radius and Set radius to map centre. Focus moves to the chosen shape type on open, and back to Shapes when the sheet closes. Targets are 44 px or more. On a short, wide screen the switch and the buttons sit side by side, and the hint gives way on a short screen. The controls scroll inside the surface once it reaches its height cap (see "Layout and slots"), with a fade at the end that has more.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `ShapesSection`                        | A region named "Shapes": a list of drawn shapes (each row a button that selects it, with its measures and `aria-current` on the selected one), Delete selected shape, Delete all shapes, "Import GeoJSON, CSV or WKT" under an Import heading with a native select labelled "WKT coordinate order" above it ("Longitude, latitude (default)" or "Latitude, longitude", kept for the session only), both shown only when the host supplies a file opener, and Download GeoJSON, Download CSV, Download WKT and Copy link with shapes under an Export heading, each with its outcome beside it in words and an icon. Import opens the browser's own file picker; the result says how many shapes were added, how many were skipped and why, and whether holes were left out, or why the file was refused ("3 shapes imported. 1 skipped: 1 with edges that cross."), politely for success and assertively for a refusal, through `LiveRegion`. When the first position of a WKT file is outside the world in the order in use but inside it in the other, nothing is imported, the result says so (assertively, once), and a button below it ("Read as latitude, longitude" or "Read as longitude, latitude") reads the same file the other way and sets the select. Imported shapes are one undo step, the first is selected, and the map fits to them clear of the sheet or side panel. Above 50 shapes the result adds that a link carries at most 50, so a file is the way to share them. An import that would take the drawing past 1,000 shapes is refused whole, in words. Focus stays on the Import button. It states that nothing is saved or uploaded and what a link holds.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `MarkerGlyph`                          | The marker shape and colour as a decorative SVG (`aria-hidden`); words beside it carry the meaning. Its colour is a `fill` attribute, so it needs no inline style.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `DirectionsPanel`                      | Shown in the sheet or side panel while Directions is the open surface, which opens from the "Directions" button (`aria-pressed`) and is one of the one-at-a-time surfaces with Measure, search and the pin card; opening it closes Measure, and a long press or the P key records a pin without closing it. Groups under h3 headings: "Stops" (an ordered list; each row has a letter, a name or coordinates, and "Move stop A up", "Move stop A down" and "Remove stop A" buttons; "Add stop at map centre", "Add dropped pin" when a pin exists, and a search form for a place that adds a stop only when a result is chosen: the field takes the panel's full width with its button below it, as wide as its label like the panel's other buttons, so the placeholder has room for text about 60 percent longer than English at 320 pixels wide, and the field's accessible name is the full text whatever the placeholder shows), "Route" (a "Travel mode" segmented control for Drive, Walk and Cycle, and "Get route"), and "Travel time area" (4 buttons for 5, 10, 15 and 30 minutes, with `aria-pressed` for the one shown, and a note under them saying what a request sends and to whom, supplied by the host). Taps on the map add stops while it is open, and data layers ignore taps. "Add stop at map centre" and the crosshair use the middle of the part of the map the sheet or side panel leaves free, never the hidden centre. Nothing is sent until "Get route" or an area button is pressed. A result card gives distance and time (a route, with a line for each leg beyond two stops) or the area's size, and a new result fits the map clear of the panel. States: loading with a Cancel button, no route found or nothing reachable (no retry), busy or unreachable service (Try again, worded as possibly offline), and a cancelled request, which says "Cancelled" and shows nothing. Changing a stop or the mode clears a result that no longer fits. Results are not stored and never go in the permalink. Stops are lettered discs on the map, so they never rely on colour. Every outcome is announced through `LiveRegion`; the panel has no live region of its own. Closing the panel keeps the stops and the drawn result, so the map can be seen; "Clear directions" removes them. The map credits add OpenStreetMap and the service's name while a result is drawn.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `ShapeGlyph`                           | A polygon or line as a decorative SVG: the fill over its hatching and ink outline, or the coloured line over a white casing, with the class's dash and width, the same cues the map draws. Colours and dashes are SVG attributes. A key lists a class's swatch and its words, so no class is told apart by colour alone.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Layer key                              | `LayerKey`, used by the "Key for ..." list in the Layers section and by the map key, draws each entry with `MarkerGlyph` or `ShapeGlyph`; stacked, as in the map key, each entry has its own line and every glyph is centred in a column of one fixed width, so the words line up. A heatmap's key names each step of its ramp with a density word (such as Sparse, Moderate, Dense). A vector tile layer's key lists every source layer's classes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
