/* The picture of the street behind a building's public page, and the page's
 * one scroll rule.
 *
 * Loaded only by that page — see app/views/buildings/show.html.erb. It is here
 * rather than in the markup because the rules that matter are a calc over a
 * custom property and a property on <html>, neither of which Tailwind can say
 * from inside the body of a template.
 *
 * Mapbox draws the image centred on the building. The pin over it is laid out
 * by the page and lands wherever the copy underneath pushes it, so the image
 * has to be moved to meet the pin rather than the other way round: it sits in
 * a box centred on the pin's tip, and object-fit does the covering.
 */

/* The <picture> around the image is a shape switch and nothing else, so it is
 * taken out of the layout entirely rather than left as a zero-height flex item
 * in the middle of the hero's column. */
.building-map-frame {
  display: contents;
}

.building-map {
  /* Where the pin's tip sits, as a share of the section's height.
   * building_map_controller.js measures the real figure and writes it here;
   * this default is what the page looks like with the script dead, which is a
   * pin a few pixels off rather than a map in the wrong place. */
  --tip: 34%;

  position: absolute;
  left: 50%;
  top: var(--tip);
  transform: translate(-50%, -50%);

  /* Tall enough to reach both edges of the section from a centre that is not
   * the section's own centre: twice the longer of the two halves. Width is the
   * section's, because the pin is centred across it. */
  width: 100%;
  height: calc(2 * max(var(--tip), 100% - var(--tip)));

  /* Cover rather than stretch, and centred — which is what keeps the building's
   * own coordinate under the tip whatever shape the section ends up. */
  object-fit: cover;
  object-position: center;

  /* What shows while Mapbox answers, and wherever it never does: ecru-100,
   * so the section reads as the page's own ground rather than as a gap (a
   * mock-up, 28 Oct 2026; it was emerald-900 under the old emerald hero). The
   * scrim over the top does the rest. */
  background-color: #f7edde;
}

/* Anything landing on the claim anchor rides down to it rather than jumping,
 * which is what makes it read as one page scrolling rather than as a link that
 * went somewhere. Nothing on either page links to it from inside any more — the
 * to-do list's cards did, then the building page's two capability sections, and
 * those go straight into the claim's own pages now — so what this is left for is
 * a URL ending #claim, which is still how a shared link arrives at a guide's
 * ask. On <html> because that is the element the fragment scrolls, and on these
 * pages only: the app's others have not asked for it.
 *
 * Off where the reader has asked for less motion. Smooth scrolling is exactly
 * the kind of movement prefers-reduced-motion is for, and the jump it falls
 * back to is the behaviour every other page already has. */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(/leaflet/layers.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(/leaflet/layers-2x.png);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: url(/leaflet/marker-icon.png);
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}
/*
 * Lexxy theme overrides.
 *
 * Lexxy is themed entirely through CSS custom properties (see the gem's
 * lexxy-variables.css). This file:
 *   1. Re-points Lexxy's accent to the app's emerald brand (links / focus / selection).
 *   2. Supplies a dark theme, keyed off the `.dark` class the app toggles on <html>
 *      (see app/views/shared/_head.html.erb). Without this the toolbar/canvas render
 *      white-on-dark. Dark values mirror Lexxy's own sandbox reference theme.
 *
 * MUST be loaded AFTER "lexxy" in the stylesheet_link_tag so the light-mode :root
 * overrides win on source order (equal specificity to Lexxy's own :root). The
 * html.dark block wins on specificity regardless of order. Only the base variables
 * need overriding — Lexxy's derived semantic vars (canvas, text, link, selection,
 * code-bg, table…) re-resolve from these.
 */

:root {
  /* Emerald accent to match the app (Tailwind emerald-600/500/200/100). */
  --lexxy-color-accent-dark: #059669;
  --lexxy-color-accent-medium: #10b981;
  --lexxy-color-accent-light: #a7f3d0;
  --lexxy-color-accent-lightest: #d1fae5;
}

/*
 * In-editor headings: the sizes the read pages use, and a sensible line-height.
 *
 * Lexxy 1.0 sizes headings in em of the editor's text rather than in rem. The
 * editor host carries the app's `text-sm`, so left alone an h2 would shrink
 * from 24px to 21px and an h1 from 32px to 28px, while the read pages
 * (`.trix-content` in application.tailwind.css) stay at 2rem / 1.5rem /
 * 1.25rem, and a post should look in the editor the way it will publish.
 * These are the rem sizes Lexxy 0.9 used.
 *
 * Lexxy sets no line-height on headings either, so they inherit the 20px that
 * `text-sm` pins on the host and wrapped headings collapse onto each other.
 *
 * Lexxy scopes its own heading rules under :where(.lexxy-content) (zero
 * specificity), so `.lexxy-content h1…` wins.
 */
.lexxy-content h1,
.lexxy-content h2,
.lexxy-content h3,
.lexxy-content h4,
.lexxy-content h5,
.lexxy-content h6 {
  line-height: 1.2;
}

.lexxy-content h1 { font-size: 2rem; }
.lexxy-content h2 { font-size: 1.5rem; }
.lexxy-content h3 { font-size: 1.25rem; }
.lexxy-content h4 { font-size: 1rem; }
.lexxy-content h5 { font-size: 0.875rem; }
.lexxy-content h6 { font-size: 0.75rem; }

html.dark {
  /* Grayscale ramp inverted for dark backgrounds. */
  --lexxy-color-ink: oklch(96% 0 0);
  --lexxy-color-ink-medium: oklch(75% 0 0);
  --lexxy-color-ink-light: oklch(55% 0 0);
  --lexxy-color-ink-lighter: oklch(40% 0 0);
  --lexxy-color-ink-lightest: oklch(25% 0 0);
  --lexxy-color-ink-inverted: oklch(15% 0 0);

  /* Emerald accent, brightened for dark (emerald-400/500/800/900). */
  --lexxy-color-accent-dark: #34d399;
  --lexxy-color-accent-medium: #10b981;
  --lexxy-color-accent-light: #065f46;
  --lexxy-color-accent-lightest: #064e3b;

  --lexxy-color-red: oklch(70% 0.15 27);
  --lexxy-color-green: oklch(70% 0.15 145);
  --lexxy-color-blue: oklch(75% 0.196 258);
  --lexxy-color-purple: oklch(70% 0.15 305);

  /* Syntax highlighting tokens tuned for dark (GitHub dark palette). */
  --lexxy-color-code-token-att: #ff7b72;
  --lexxy-color-code-token-comment: #8b949e;
  --lexxy-color-code-token-function: #d2a8ff;
  --lexxy-color-code-token-operator: #ff7b72;
  --lexxy-color-code-token-property: #79c0ff;
  --lexxy-color-code-token-punctuation: #f0f6fc;
  --lexxy-color-code-token-selector: #7ee787;
  --lexxy-color-code-token-variable: #ffa657;

  --lexxy-shadow: 0 0 0 1px rgba(100, 100, 100, 0.3);

  --highlight-1: rgb(240, 200, 22);
  --highlight-2: rgb(230, 118, 14);
  --highlight-3: rgb(244, 5, 5);
  --highlight-4: rgb(248, 21, 192);
  --highlight-5: rgb(214, 80, 255);
  --highlight-6: rgb(53, 157, 255);
  --highlight-7: rgb(26, 231, 23);
  --highlight-8: rgb(201, 135, 72);
  --highlight-9: rgb(161, 161, 161);
}
/* The admin mail drop map.
 *
 * Loaded only by that page — see app/views/admin/property_map/show.html.erb —
 * because it is the only page that pulls Leaflet in, and these rules exist to
 * override Leaflet's own stylesheet rather than to style anything of ours.
 * Everything else on the page is Tailwind.
 */

/* Cluster bubbles standing in for buildings that are too dense to draw.
 *
 * leaflet.css loads before this one and sets `display: block` on
 * .leaflet-marker-icon, so these overrides are qualified with that class to
 * outrank it. A bare .cluster loses on source order and the label lands in the
 * top-left corner instead of the middle. Same reason for the popup rules below.
 */
.leaflet-marker-icon.cluster {
  display: grid;
  place-items: center;
  border-radius: 50%;
  /* emerald-700, which is the section's own colour rather than Leaflet's blue. */
  background-color: rgb(4 120 87 / 80%);
  box-shadow: 0 0 0 3px rgb(4 120 87 / 20%);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* A building, drawn as the thing it is rather than as a dot: the glyph out of
   map_pins.js in a circle, sized by how many homes are in it.

   The same pin the public map draws — see public_map.css, which is these rules
   in the section's own eggplant — because a building should be the same object
   on both maps. Named apart from that one rather than shared with it: every
   stylesheet in this directory ends up in application.css as well, so two
   files claiming .map-pin would be decided by which page linked which last.
   The cluster bubbles above are named apart for the same reason.

   Three colours rather than the public map's two, which is the one thing about
   these pins that is admin's own: green for a building we hold, yellow for one
   the post has been to, red for one we only know about. Each sets --pin and
   everything else reads it, so the badge over a stack and the ring under a
   pressed pin follow the building without a rule apiece.

   Qualified with .leaflet-marker-icon because leaflet.css loads first and sets
   `display: block` on it, which would leave the glyph in the corner rather
   than the middle. The size is written onto each pin by Leaflet, from
   iconSize — the glyph is a share of whatever that turns out to be. */
.leaflet-marker-icon.pin {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background-color: var(--pin);
  /* Neutral-900 rather than a ring per colour: three of them on one screen is
     already the thing being read, and the ring is only there so a pin standing
     on a dark roof keeps its edge. */
  box-shadow: 0 0 0 2px rgb(23 23 23 / 25%), 0 1px 3px rgb(23 23 23 / 35%);
  cursor: pointer;
}

.pin svg {
  width: 58%;
  height: 58%;
  fill: #ffffff;
}

.pin--held {
  --pin: #047857; /* emerald-700 */
  --pin-pressed: #065f46; /* emerald-800 */
}

.pin--dropped {
  --pin: #b45309; /* amber-700 */
  --pin-pressed: #92400e; /* amber-800 */
}

.pin--unclaimed {
  --pin: #b4381f; /* the red the map has always drawn an unheld building in */
  --pin-pressed: #902d19;
}

/* Hovered on something with a pointer: the one about to be pressed lifts out of
   the crowd around it. A darker shade of its own colour rather than one shade
   for all three, which would read as the pin changing what it is under the
   pointer. */
.leaflet-marker-icon.pin:hover,
.leaflet-marker-icon.pin:focus-visible {
  background-color: var(--pin-pressed);
  z-index: 1000 !important; /* Leaflet writes a per-marker z-index inline. */
}

/* Several buildings on identical coordinates, drawn as one pin with the count
   on it.

   Which exists because two pins on one point are one pin as far as a press is
   concerned: whichever was drawn last takes every click and the rest cannot be
   reached at any zoom, because zooming in never separates points that are the
   same point. Nor is it rare — around a twentieth of the extract stands on a
   shared point, almost all of it Australian, five in six of those a pair of
   buildings on the same street. Pressing this spreads them onto a ring around
   the point they share; see #spreadOut in map_controller.js.

   The element carries .pin as well as this one, so the circle, the glyph, the
   colour and the hover all come from the rules above: it is still a building
   pin and pressing it still ends up at a building. The count rides over the
   corner of it rather than sitting in the middle of it, because the number in
   the middle is what the cluster bubbles are, and a bubble means "stand
   closer" — which is the one thing pressing this will never do. */
.stack-count {
  position: absolute;
  top: -0.125rem;
  right: -0.125rem;
  display: grid;
  place-items: center;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.1875rem;
  border-radius: 0.5rem;
  /* White on the pin's own colour rather than the other way about, so the badge
     reads as something stuck onto the pin rather than as a hole punched out of
     it, and ringed in that colour so it keeps its edge where it overhangs the
     map. */
  background-color: #ffffff;
  box-shadow: 0 0 0 1.5px var(--pin);
  color: var(--pin);
  font-size: 0.5625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* The same pin once its buildings have moved out onto their ring: the point
   itself, with nothing left on it but the count and the legs running back in.

   Smaller, because what stands here now is a place rather than a building —
   the glyph is left out of the markup rather than hidden here, and the size
   comes from FAN_HUB — and haloed rather than shadowed, so it reads as the
   middle of something rather than as one more pin among the ones it just let
   go. Pressing it puts them back. */
.leaflet-marker-icon.stack--open {
  box-shadow: 0 0 0 2px rgb(23 23 23 / 25%), 0 0 0 6px rgb(23 23 23 / 12%);
}

/* And the count, which is the whole of what it carries now: in the middle of
   the disc rather than over its corner, and drawn in the white the badge was
   drawn on. */
.stack--open .stack-count {
  position: static;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  color: #ffffff;
  font-size: 0.625rem;
}

/* G-NAF ships names in upper case and they are left that way rather than
   title-cased, which mangles names like O'DEA and MCKINNON. */
.leaflet-popup .leaflet-popup-content {
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.leaflet-popup-content strong {
  display: block;
}

.leaflet-popup-content span {
  display: block;
  color: #525252; /* neutral-600 */
}

/* Links in a popup — the way in to setting a building up, and every home's own
   page — in the section's emerald rather than the browser's blue. Set on the
   anchor because a UA colour beats the neutral one the span rule inherits. */
.leaflet-popup-content a {
  color: #047857; /* emerald-700 */
  font-weight: 600;
  text-decoration: underline;
}

/* A building can hold hundreds of units, so the list scrolls inside the popup
   rather than growing taller than the map. The bullets are asked for because
   Tailwind's preflight strips list markers from every ul on the page. */
.unit-addresses {
  max-height: min(11rem, 30vh);
  margin: 0.5rem 0 0;
  padding: 0.5rem 0 0 1.125rem;
  overflow-y: auto;
  border-top: 1px solid #e5e5e5; /* neutral-200 */
  list-style: disc;
}

.unit-addresses li {
  padding: 0.0625rem 0;
}

/* Leaflet paints its own controls and popups on white and does not read the
   theme, so the tiles and everything over them stay light. Only the panel the
   map sits in follows the page. */
.leaflet-container {
  background: #e5e5e5;
}

/* The Street View photo at the head of a building's popup. Requested at twice
   the popup's width for retina screens, so it is sized here rather than by the
   width and height attributes it carries — those are only there to hold the
   right shape while it loads, so the popup does not jump as it lands. */
.leaflet-popup-content .street-view {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
  border-radius: 0.25rem;
  background-color: #e5e5e5; /* neutral-200, which is what shows while it loads. */
}

/* Each home in the list links to its own public page — the one the QR code
   printed for that door opens. Leaflet styles its popup links blue and
   underlined; these are the section's emerald and undecorated until hovered,
   because a list where every line is underlined reads as a wall rather than as
   addresses. */
.unit-addresses a {
  color: #047857; /* emerald-700 */
  text-decoration: none;
}

.unit-addresses a:hover {
  color: #064e3b; /* emerald-900 */
  text-decoration: underline;
}

/* The solar estimate, which is the one part of a popup that is asked for rather
   than loaded. Set off above the list of front doors by a rule of its own, so
   the button does not read as another fact about the building. */
.solar {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e5e5; /* neutral-200 */
}

/* Leaflet's popup stylesheet does not reach buttons, because until now a popup
   here held none. Sized to the popup rather than to the page: this is the
   width the unit list and the photo already are. */
.solar-button {
  display: block;
  width: 100%;
  padding: 0.3125rem 0.5rem;
  border: 1px solid #047857; /* emerald-700 */
  border-radius: 0.25rem;
  background-color: #ffffff;
  color: #047857;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.solar-button:hover:not(:disabled) {
  background-color: #ecfdf5; /* emerald-50 */
}

/* While Google is being asked. Still a button rather than a line of text, so
   the popup does not change height underneath the cursor that just pressed it. */
.solar-button:disabled {
  border-color: #d4d4d4; /* neutral-300 */
  color: #737373; /* neutral-500 */
  cursor: default;
}

/* A refusal, or the reason a per-home figure is missing. Sits above the button
   it explains. */
.solar-note {
  display: block;
  margin-bottom: 0.375rem;
  color: #b45309; /* amber-700 — a caveat rather than a failure. */
}

/* Owed to Google beside any of their solar data, and quiet because it is a
   credit rather than something to read — the same treatment the base layer's
   own credit gets in the corner of the map. */
.solar-credit {
  display: block;
  margin-top: 0.375rem;
  color: #a3a3a3; /* neutral-400 */
  font-size: 0.6875rem;
}

/* Between what the roof does and what it is worth. A rule rather than another
   border, because the block above it is already inside .solar's own. */
.solar-rule {
  margin: 0.5rem 0;
  border: 0;
  border-top: 1px dashed #e5e5e5; /* neutral-200 */
}

/* The sources under the business case are links rather than the plain grey the
   credit above them is, but they keep its size — they are provenance, not
   something to read. */
.solar-credit a {
  color: #a3a3a3; /* neutral-400 */
  font-weight: 400;
}

.solar-credit a:hover {
  color: #047857; /* emerald-700 */
}

/* The roof from above with the panels drawn on it. Square, and the full width
   of the popup — the same treatment the Street View photo at the top gets, and
   for the same reason: it is read at a glance. */
.roof {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.25rem;
  background-color: #e5e5e5; /* neutral-200, which is what shows while it loads. */
}

/* Google's panels. Filled rather than outlined, because at this range a panel
   is a dozen pixels across and an outline of one is a smudge — and light on
   purpose, since the point is to read them against a dark roof. The stroke is
   what keeps a solid block of them from reading as one shape. */
.roof-panels rect {
  fill: rgb(56 189 248 / 55%);   /* sky-400 */
  stroke: rgb(224 242 254 / 70%); /* sky-100 */
  stroke-width: 0.4;
}

/* The drawing of the building, in the same popup and below the roof. The same
   treatment both of the other pictures in here get — full width, read at a
   glance — and the drawing itself is 3:2 rather than square, so the shape is
   left to the image.

   Its own class rather than .street-view, so that a change to the photograph at
   the head of the popup does not silently reshape a drawing further down it. */
.leaflet-popup-content .illustration {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
  border-radius: 0.25rem;
  background-color: #e5e5e5; /* neutral-200, which is what shows while it loads. */
}
/* The maps on the public "Find your home" screens.
 *
 * Two of them, and this covers both: the map the address screen is drawn on —
 * panned, zoomed and pressed, see find_home_map_controller.js — and the still
 * one behind the second screen's form, see map_background_controller.js.
 *
 * Short, because almost everything on these screens is Tailwind: the pins, the
 * bubbles a zoomed-out screen is drawn with, and the card a pressed pin opens
 * are the only things here Leaflet needs talking out of its own styling.
 *
 * Loaded only by those screens, because they are the only public pages that
 * pull Leaflet in, and everything here exists to override Leaflet's own
 * stylesheet rather than to style anything of ours. Everything else on the
 * screens is Tailwind. Same arrangement as property_map.css, which does this
 * job for the admin map.
 *
 * Loaded after leaflet.css and matching it for specificity, so source order is
 * what carries these. Keep the pair in that order in the link tag.
 */

/* --- The still map behind the second screen --- */

.map-background {
  /* Leaflet paints its container grey for the moment before the tiles land.
     That is right for a map somebody is reading and wrong for one behind a
     form: what belongs under this type is the emerald the rest of the public
     site sits on, whether the tiles are a moment away or — no token, an origin
     off the allowlist — never coming. The section's own background shows
     through instead. */
  background: transparent;

  /* Inert. Every handler is off in map_background_controller.js, but a
     background should not be swallowing a tap or a drag meant for the page
     either, and there is nothing in there to click: the credit is printed under
     the form rather than drawn into the corner of the map. */
  pointer-events: none;
}

/* --- The map the address screen is drawn on --- */

/* Bubbles standing in for the buildings a zoomed-out screen holds too many of
   to draw. The section's own emerald rather than Leaflet's blue, and darker
   than the admin map's so the count on it reads white.

   leaflet.css loads first and sets `display: block` on .leaflet-marker-icon, so
   this is qualified with that class to outrank it — a bare .map-cluster loses
   on source order and the count lands in the corner instead of the middle. */
.leaflet-marker-icon.map-cluster {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background-color: rgb(4 120 87 / 85%); /* emerald-700 */
  box-shadow: 0 0 0 4px rgb(4 120 87 / 20%);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

/* A building, drawn as the thing it is: the glyph out of
   find_home_map_controller.js in a circle, in the section's own eggplant
   against the emerald the bubbles wear, so the two never read as the same kind
   of mark. Dark enough for the glyph to be white on it, and ringed in the same
   colour so a pin standing on a dark building footprint still has an edge.

   Qualified with .leaflet-marker-icon for the reason the bubbles are: leaflet
   .css loads first and sets `display: block` on it, which would leave the glyph
   in the corner rather than the middle.

   The size is written onto each pin by Leaflet, from iconSize — the glyph is a
   share of whatever that turns out to be. */
.leaflet-marker-icon.map-pin {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background-color: #553A47; /* eggplant-700 */
  box-shadow: 0 0 0 2px rgb(36 25 31 / 35%), 0 1px 3px rgb(36 25 31 / 40%); /* eggplant-900 */
  cursor: pointer;
}

.map-pin svg {
  width: 58%;
  height: 58%;
  fill: #ffffff;
}

/* A building somebody is already at: homes that have joined, or neighbours who
   have opened this pin before. Emerald rather than the eggplant every other pin
   wears, which makes the one thing on this map that can be read without pressing
   anything — a street of pins with two warm ones in it, before a single card is
   opened.

   The card's own "already here" line is emerald too, and that is the point: the
   colour out here is the promise and the line in there is what it promised. See
   hereLine() in find_home_map_controller.js, and MultiUnitProperty#pin_here,
   which decides both from one string so they cannot disagree.

   emerald-700 rather than the emerald-600 of the dot on that line, because this
   one has the white building glyph on it and the lighter one does not hold it.
   Which is the colour the zoomed-out bubbles wear, and they are alone in the
   frame: #draw picks clusters or pins and never draws both, so the only place
   the two meet is either side of a zoom. The bubble is a flat disc of text with
   a wide soft ring and this is a glyph in a hard-edged circle, which is the
   difference the eggplant was carrying anyway. */
.leaflet-marker-icon.map-pin--here {
  background-color: #047857; /* emerald-700 */
  box-shadow: 0 0 0 2px rgb(2 44 34 / 30%), 0 1px 3px rgb(2 44 34 / 40%); /* emerald-950 */
}

/* Hovered on something with a pointer: the one about to be pressed lifts out of
   the crowd around it. Transform rather than a size change, so nothing reflows
   and the pin stays anchored where the building is. */
.leaflet-marker-icon.map-pin:hover,
.leaflet-marker-icon.map-pin:focus-visible {
  background-color: #3d2933; /* eggplant-800 */
  z-index: 1000 !important; /* Leaflet writes a per-marker z-index inline. */
}

/* A warm pin darkens into its own colour rather than into the eggplant above,
   which would read as the pin changing what it is under the pointer. Written
   after that rule and at the same specificity, so source order carries it. */
.leaflet-marker-icon.map-pin--here:hover,
.leaflet-marker-icon.map-pin--here:focus-visible {
  background-color: #065f46; /* emerald-800 */
}

/* Several buildings on identical coordinates, drawn as one pin with the count
   on it.

   Which exists because two pins on one point are one pin as far as a press is
   concerned: whichever was drawn last takes every click and the rest cannot be
   reached at any zoom, because zooming in never separates points that are the
   same point. Nor is it rare — around a twentieth of the extract stands on a
   shared point, five in six of those a pair of buildings on the same street.
   Pressing this spreads them onto a ring around the point they share; see
   #spreadOut in find_home_map_controller.js, which is where that ring is
   worked out, and #stackMarker for the rest of the reasoning.

   The element carries .map-pin as well as this one, so the circle, the glyph,
   the warm colour and the hover all come from the rules above: it is still a
   building pin and pressing it still ends up at a building. The count rides
   over the corner of it rather than sitting in the middle of it, because the
   number in the middle is what the zoomed-out bubbles are, and a bubble means
   "stand closer" — which is the one thing pressing this will never do.

   Ecru on eggplant rather than the other way about, so the badge reads as
   something stuck onto the pin rather than as a hole punched out of it, and
   ringed in the pin's own colour so it keeps its edge where it overhangs the
   map. */
.map-stack-count {
  position: absolute;
  top: -0.125rem;
  right: -0.125rem;
  display: grid;
  place-items: center;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.1875rem;
  border-radius: 0.5rem;
  background-color: #f7edde; /* ecru-100 */
  box-shadow: 0 0 0 1.5px #553A47; /* eggplant-700 */
  color: #3d2933; /* eggplant-800 */
  font-size: 0.5625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* The badge takes the pin's colour with it, for the reason the pin has two
   colours at all: a stack holding a building somebody is already at is warm,
   and a warm pin wearing an eggplant badge would read as two things at once. */
.map-pin--here .map-stack-count {
  box-shadow: 0 0 0 1.5px #047857; /* emerald-700 */
  color: #065f46; /* emerald-800 */
}

/* The same pin once its buildings have moved out onto their ring: the point
   itself, with nothing left on it but the count and the legs running back in.

   Smaller, because what stands here now is a place rather than a building —
   the glyph is left out of the markup rather than hidden here, and the size
   comes from FAN_HUB — and haloed rather than shadowed, so it reads as the
   middle of something rather than as one more pin among the ones it just let
   go. Pressing it puts them back. */
.leaflet-marker-icon.map-stack--open {
  box-shadow: 0 0 0 2px rgb(36 25 31 / 35%), 0 0 0 6px rgb(85 58 71 / 20%); /* eggplant-900, -700 */
}

.leaflet-marker-icon.map-pin--here.map-stack--open {
  box-shadow: 0 0 0 2px rgb(2 44 34 / 30%), 0 0 0 6px rgb(4 120 87 / 25%); /* emerald-950, -700 */
}

/* And the count, which is the whole of what it carries now: in the middle of
   the disc rather than over its corner, and drawn in the ecru the badge was
   drawn on. Written after the warm rule above and at the same specificity, so
   source order carries it — an open hub is one colour of count whether or not
   somebody is already inside it. */
.map-stack--open .map-stack-count {
  position: static;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  color: #f7edde; /* ecru-100 */
  font-size: 0.625rem;
}

/* Pressing a pin shows the card a building's own page opens with: the drawing
   of the building where one has been made, the panels saying what the building
   is, and the button that opens the page — see buildings/_hero, and pinCard()
   in find_home_map_controller.js, which writes everything inside it in the
   page's own Tailwind classes.

   Ours rather than a Leaflet tooltip, and that is the whole reason it is here:
   Leaflet draws a tooltip inside the map's own pane, which is transformed on
   every pan — and a transformed element is a stacking context, so nothing in
   there can be painted over the panel floating above the map however its
   z-index is written. This card is a sibling of the panel instead, one step
   above it. */
.map-tip {
  /* The point given to it is the pin: the card hangs above that point, centred
     on it, and #showCard shifts it sideways near an edge of the map. */
  transform: translate(-50%, -100%);
  border-radius: 0.75rem;
  background-color: #f7edde; /* ecru-100 */
  color: #022c22; /* emerald-950 */
  /* Lifted off the map the way the page's own card is lifted off its
     photograph, in the same emerald rather than in grey. */
  box-shadow: 0 10px 20px -6px rgb(2 44 34 / 45%);
  /* Wide enough to stand three panels beside each other and still leave the
     longest Act — Queensland's "Body Corporate and Community Management Act
     1997" — wrapping to four lines rather than to six. Twenty-three rem is
     about as much as the card can take: it floats over the map it is pointing
     at, and one wide enough never to wrap would cover the street somebody is
     checking it against. The extra rem over the old width is the padding's
     rather than the panels' — a roomier card should not be a card with
     narrower tiles in it.

     The `min()` is the phone's veto, and it is load-bearing rather than
     defensive. `#showCard` holds the card back from either edge of the map, but
     a card wider than the map cannot be held anywhere — it would be clipped by
     the section with its own button off the side — and 23rem is wider than a
     360px handset. Read against the viewport rather than the map because this
     map is the viewport, full-bleed under the nav. */
  width: max-content;
  max-width: min(23rem, calc(100vw - 1.5rem));
}

/* The card's own margins, on a box inside it rather than on the card itself.
   Which is the one thing the drawing above it asked for: a picture inside a
   padded card is a picture with a frame of ecru around it, and this one reaches
   the card's edges. The same move buildings/_hero makes for the same picture,
   and for the same reason — that card clips instead, because it has no tail
   hanging off it to clip along with the corners.

   Everything on the card but the drawing is in here. See pinCard(), which wraps
   the type in it and leaves the picture outside. */
.map-tip-body {
  display: block;
  padding: 1.125rem 1.25rem;
}

/* The drawing of the building, across the top of the card that names it — the
   same picture the building's own page carries at the head of the same card.
   Almost every building has none, and almost every card is therefore exactly
   the card it always was.

   Rounded to the card's own corners rather than clipped to them, and that is
   the reason the radius is written twice: the tail is drawn outside the card by
   ::after below, so the card cannot be told to hide what overflows it.

   Full width, and `height: auto` is what makes the frame on the element mean
   something — pinCard() writes the width and height the drawing will arrive in
   onto it, and those two hold the right space open before a byte of it has
   landed, which is what keeps #drawCard's measurement honest. The ecru is what
   fills that space in the meantime, the same shade the page's own card holds it
   with.

   Which also settles the width of any card carrying one: a drawing is wider
   than the card is allowed to be, so a card with a picture is always as wide as
   a card can get. Deliberate — the same drawing shown three inches wide on one
   pin and two on the next is one card at two sizes for no reason a reader could
   name. */
.map-tip-picture {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem 0.75rem 0 0;
  background-color: #F4e4cd; /* ecru-200 */
}

/* Under the pin instead, for a pin with no room above it: the section clips
   what runs past its own top edge, and a card cut off up there is a button
   nobody can reach rather than a caption half read. #showCard measures and
   decides. */
.map-tip--below {
  transform: translate(-50%, 0);
}

/* The tail, and the point of hanging the card off the pin rather than beside
   it: it lands on the building the card is about. `--tail` is where along the
   card that is, which is the middle until the card has been held back from an
   edge of the map — see #showCard. */
.map-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: var(--tail, 50%);
  margin-left: -0.375rem;
  border: 0.375rem solid transparent;
  border-bottom: 0;
  border-top-color: #f7edde; /* ecru-100 */
}

/* And the same tail on the other edge, for a card hanging below its pin. */
.map-tip--below::after {
  top: auto;
  bottom: 100%;
  border-top: 0;
  border-bottom: 0.375rem solid #f7edde; /* ecru-100 */
}

/* The building pins drawn over the homepage hero's search panel (MOCK-UP,
   Michael, 11 Nov 2026): .map-pin as the map on /register draws it, but
   standing in the page at fixed places rather than on Leaflet's marker pane,
   so it takes its own class. Centred on its point, as a marker is. See
   public/_hero_copy. */
.hero-map-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  translate: -50% -50%;
  border-radius: 50%;
  background-color: #553A47; /* eggplant-700 */
  box-shadow: 0 0 0 2px rgb(36 25 31 / 35%), 0 1px 3px rgb(36 25 31 / 40%); /* eggplant-900 */
  pointer-events: none;
}

.hero-map-pin svg {
  width: 58%;
  height: 58%;
  fill: #ffffff;
}

.hero-map-pin--here {
  background-color: #047857; /* emerald-700 */
  box-shadow: 0 0 0 2px rgb(2 44 34 / 30%), 0 1px 3px rgb(2 44 34 / 40%); /* emerald-950 */
}

/* A pin for a wide screen only: on a map the hero's words stand over on a
   phone, where it would land on the heading. */
@media (max-width: 1023px) {
  .hero-map-pin--wide {
    display: none;
  }
}
/* The painted quilt on the homepage hero (MOCK-UP, 4 Nov 2026). See
   QuiltHelper for the pieces and public/_quilt_hero for the four heroes.

   A cell is a painted square with whatever lies on it stacked over it, each
   piece filling the cell. --turn turns a piece by quarters; --wx, --wy and
   --wr lay the cell a little off true, so the squares read as put down by
   hand. */
.quilt-cell {
  position: relative;
  width: var(--tile);
  height: var(--tile);
  transform: translate(var(--wx, 0), var(--wy, 0)) rotate(var(--wr, 0));
}
.quilt-cell > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(var(--turn, 0deg));
  user-select: none;
  pointer-events: none;
}

/* ── The wall and the floor ──────────────────────────────────────────────

   A grid of as many columns as the screen holds, wider than the screen by a
   tile so the squares at either end are cut by its edges, and deeper than it,
   cut off at the foot. The words take a block of cells, the window, and every
   other cell flows round it (dense), so the window is a hole in the quilt
   wherever the screen puts the columns. */
.quilt-grid {
  --tile: 48px;
  --gap: 4px;
  position: absolute;
  top: 0;
  left: calc(var(--tile) / -2);
  width: calc(100% + var(--tile));
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--tile));
  grid-auto-rows: var(--tile);
  grid-auto-flow: dense;
  justify-content: center;
  gap: var(--gap);
  padding-top: var(--gap);
}
.quilt-window {
  grid-column: 1 / -1;
  grid-row: 2 / span 8;
  display: flex;
  align-items: center;
  padding-inline: calc(var(--tile) / 2 + 1.5rem);
}
@media (min-width: 640px) {
  .quilt-grid { --tile: 60px; --gap: 6px; }
  .quilt-window { grid-column: 2 / -2; grid-row: 2 / span 7; padding-inline: 1.5rem; }
}
@media (min-width: 1024px) {
  .quilt-grid { --tile: clamp(72px, 6.5vw, 104px); --gap: 8px; }
  .quilt-window { grid-column: 2 / span 8; grid-row: 2 / span 5; padding-inline: 2.5rem; }
}
@media (min-width: 1536px) {
  .quilt-window { grid-column: 3 / span 8; }
}

/* The floor's quarter-circles turn: by themselves now and then, and under
   the pointer (quilt_floor_controller.js). The turn is cumulative, so a tile
   always turns the same way round. */
.quilt-floor .quilt-quarter {
  transition: transform 700ms cubic-bezier(0.5, 0, 0.2, 1);
}

/* ── The building ────────────────────────────────────────────────────────

   The squares are one size on every screen, 64 px (Michael, 4 Nov 2026), so a
   wider screen shows more of the street and a narrower one less. It stands
   behind the words, on the activity band, cut off at the top where there is
   no room for all of it.

   From 1440 px up it is set against the right edge and runs off the left, so
   a wider screen shows more of the low end under the words, and the tall end
   is always beside them. Below 1440 it stays where it stood at 1440 and the
   right edge cuts it instead (Michael, 4 Nov 2026): the low blocks under the
   words stay put and the tall end goes off the right, so as the screen
   narrows the tower leaves rather than sliding under the words. A phone sees
   the low blocks.

   That is the street's left edge at whichever is wider, the screen or 1440,
   less the street's own width, --street, which the markup's --cols gives.
   Its floors go up from the pavement in order on arrival, `--rise` being a
   cell's row counted from the pavement. */
/* As tall as the window under the nav, so the pavement's foot is the
   window's (Michael, 4 Nov 2026). Where that leaves too little room for the
   words over the roofs, a row taller, so the doors' foot is the window's and
   the pavement is just past it. Where even that is too little, the height the
   words need, --fit, and the window cuts the street where it falls.

   The step is the clamp: (--fit - --window) times a thousand is 0 or less
   when the window is tall enough, and far more than a row when it is not,
   so the clamp gives nothing or exactly a row.

   --above is what stands over the hero, the nav and any banner;
   quilt_street_controller.js measures it, and this is the nav alone until it
   does. --fit is the height at which the words clear the roofs under them by
   20 px, measured in the browser at each breakpoint off the words' padding
   and sizes in public/_hero_copy, for the NZ heading, the longer of the two,
   in four lines on a phone and two from 640 px (6 Nov 2026). If those
   change, these do. */
.quilt-building {
  --tile: 64px;
  --gap: 6px;
  --row: calc(var(--tile) + var(--gap));
  --above: 80px;
  --fit: 48.25rem;
  --window: calc(100svh - var(--above));
  height: max(var(--fit), calc(var(--window) + clamp(0px, (var(--fit) - var(--window)) * 1000, var(--row))));
}
@media (min-width: 640px) { .quilt-building { --fit: 45rem; } }
@media (min-width: 1024px) { .quilt-building { --above: 76px; --fit: 49.75rem; } }
@media (min-width: 1760px) { .quilt-building { --fit: 57rem; } }
@media (min-width: 1920px) { .quilt-building { --fit: 52.75rem; } }
.quilt-street-area {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.quilt-street {
  --street: calc(var(--cols) * (var(--tile) + var(--gap)) - var(--gap));
  position: absolute;
  bottom: 0;
  left: calc(max(100%, 1440px) + var(--tile) / 2 - var(--street));
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--tile));
  grid-auto-rows: var(--tile);
  gap: var(--gap);
}
.quilt-street > * { width: var(--tile); height: var(--tile); }
.quilt-street .quilt-sun { scale: 1.4; }

@keyframes quilt-rise {
  from { opacity: 0; translate: 0 calc(var(--tile) * 0.6); }
}
.quilt-street .quilt-cell {
  animation: quilt-rise 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--rise) * 90ms + var(--lag, 0ms));
}
/* A window changing kind fades across, the new picture over the old
   (quilt_street_controller.js). */
.quilt-street .quilt-mark { transition: opacity 800ms ease; }
.quilt-street .quilt-mark.quilt-faded { opacity: 0; }

/* ── The quarters ────────────────────────────────────────────────────────

   The mark's four quarter-circles, one to a corner of the hero, --q across.
   Each starts in the middle as a quarter of the circle, half the size and
   turned half round, and goes out to its corner. The turn and the shrink are
   about the piece's square corner, which is the circle's centre at the start
   and the screen's corner at the end, so the four start as one circle with a
   gap through it.

   The move is on the insets rather than a translate, because a percentage
   in a translate is the piece's own size and the way back to the middle is
   half the hero's. */
.quilt-quarters {
  --q: clamp(112px, min(34vw, 34svh), 280px);
  --gap: 6px;
  --in: calc(50% - var(--gap) / 2);
}
.quilt-big-quarter {
  position: absolute;
  width: var(--q);
  height: var(--q);
  animation: quilt-open 1.5s cubic-bezier(0.7, 0, 0.2, 1) 0.6s both;
}
.quilt-big-quarter[data-corner="tl"] { inset: 0 auto auto 0; --from: var(--in) auto auto var(--in); transform-origin: 0 0; }
.quilt-big-quarter[data-corner="tr"] { inset: 0 0 auto auto; --from: var(--in) var(--in) auto auto; transform-origin: 100% 0; }
.quilt-big-quarter[data-corner="bl"] { inset: auto auto 0 0; --from: auto auto var(--in) var(--in); transform-origin: 0 100%; }
.quilt-big-quarter[data-corner="br"] { inset: auto 0 0 auto; --from: auto var(--in) var(--in) auto; transform-origin: 100% 100%; }
@keyframes quilt-open {
  from { inset: var(--from); rotate: 180deg; scale: 0.5; }
}
.quilt-quarters .quilt-words {
  animation: quilt-words 900ms ease-out 1.3s both;
}
@keyframes quilt-words {
  from { opacity: 0; translate: 0 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .quilt-street .quilt-cell,
  .quilt-big-quarter,
  .quilt-quarters .quilt-words { animation: none; }
  .quilt-floor .quilt-quarter { transition: none; }
}

/* ── The footer's skyline ─────────────────────────────────────────────────

   A low line of the hero's blocks along the foot of every public page
   (MOCK-UP, Michael, 6 Nov 2026; see shared/_quilt_skyline). Smaller squares
   than the hero's, a grid as wide as the street, centred on the footer and
   cut off at the screen's edges, standing on its foot. It stands still. */
.quilt-skyline-area {
  overflow: hidden;
  margin-top: 2.5rem;
}
.quilt-skyline {
  --tile: 40px;
  --gap: 4px;
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--tile));
  grid-auto-rows: var(--tile);
  gap: var(--gap);
  width: max-content;
  position: relative;
  left: 50%;
  translate: -50%;
}
.quilt-skyline > * { width: var(--tile); height: var(--tile); }
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
 body {
  -webkit-tap-highlight-color: transparent;
}

/* Not inside @layer, which a browser would not mind: wkhtmltopdf's WebKit
   predates it and drops the whole block, so the PDFs never saw these faces and
   set Henrietta in Georgia. config/initializers/wicked_pdf.rb lets it read
   them. */
@font-face {
  font-family: VC Henrietta;
  font-weight: 300;
  font-display: swap;
  src: url(/fonts/HenriettaTrial-Light.woff) format("woff");
}
@font-face {
  font-family: VC Henrietta;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/Henrietta-Regular.woff) format("woff");
}
@font-face {
  font-family: VC Henrietta;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/HenriettaTrial-SemiBold.woff) format("woff");
}

/* Henrietta Regular at the font's own spacing, neither tighter nor looser
   (Michael, 28 Oct 2026), with the site's two stylistic sets kept on. Set
   outright rather than left out, so a serif line inside tracked text doesn't
   take on its tracking. */
.font-serif, .serif-h1 {
  font-weight: 400;
  letter-spacing: normal;
  font-feature-settings: "ss06" on, "ss01" on;
}

/* The help page's prose headings take the serif through Tailwind's
   prose-headings: variant rather than the class. A rule of their own, because
   wkhtmltopdf doesn't know :where and would drop the one above with it. */
.prose-headings\:font-serif :where(h1, h2, h3, h4, h5, h6, th) {
  font-weight: 400;
  letter-spacing: normal;
  font-feature-settings: "ss06" on, "ss01" on;
}
