
/* 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(images/layers.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(images/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(images/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;
		}
	}



/* Layout: the map is the page; the event card owns the right column; a single timeline rail beneath the map.
   Colour: ink on paper; muted colour only to say what kind of event it is; gold for the Prophet's position and route. */
:root {
  --bg: #f5f5f2;
  --surface: #fbfbf9;
  --ink: #1b1b19;
  --ink-2: #46463f;
  --ink-3: #74736a;
  --rule: #e3e2dc;
  --sea: #cfdfe3;
  --land: #f0e9d9;
  --coast: #c4b596;
  --river: #a9c4cc;
  --gold: #a8731a; --gold-ink: #946510;
  --gold-soft: rgba(168,115,26,.18);
  --c-revelation: #2f6b55;
  --c-life: #7a6248;
  --c-family: #8a4f6a;
  --c-persecution: #b0532f;
  --c-hijrah: #a8731a;
  --c-battle: #9c2f35;
  --c-treaty: #335f8c;
  --c-journey: #627030;
  --mk: #a8731a;
  --md: #9c4f36;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-head: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --f-ar: "Amiri", "Noto Naskh Arabic", "Geeza Pro", serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111110; --surface: #161615; --ink: #ecebe6; --ink-2: #c9c8c0; --ink-3: #a09f96; --rule: #2a2a27;
  --sea: #13202a; --land: #262420; --coast: #45403a; --river: #274350;
  --gold: #d9a74f; --gold-ink: #d9a74f; --gold-soft: rgba(217,167,79,.20);
  --c-revelation: #6cbf9c; --c-life: #c2a888; --c-family: #c88aa6; --c-persecution: #e08a62; --c-hijrah: #d9a74f; --c-battle: #e07a7f; --c-treaty: #82aedb; --c-journey: #b0c070;
  --mk: #d9a74f; --md: #d98b6c; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #111110; --surface: #161615; --ink: #ecebe6; --ink-2: #c9c8c0; --ink-3: #a09f96; --rule: #2a2a27;
  --sea: #13202a; --land: #262420; --coast: #45403a; --river: #274350;
  --gold: #d9a74f; --gold-ink: #d9a74f; --gold-soft: rgba(217,167,79,.20);
  --c-revelation: #6cbf9c; --c-life: #c2a888; --c-family: #c88aa6; --c-persecution: #e08a62; --c-hijrah: #d9a74f; --c-battle: #e07a7f; --c-treaty: #82aedb; --c-journey: #b0c070;
  --mk: #d9a74f; --md: #d98b6c; color-scheme: dark }

html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.ar { font-family: var(--f-ar); direction: rtl; }
.saw { font-family: var(--f-ar); font-weight: 400; unicode-bidi: isolate; }
.cap { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); font-weight: 500; }

.app { height: 100%; display: grid; grid-template-columns: minmax(0,1fr) clamp(440px, 40vw, 760px); grid-template-rows: auto minmax(0,1fr) auto; }
header.top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap;
  padding-block: 14px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); border-bottom: 3px solid var(--per, var(--rule)); background: var(--surface); transition: border-color .4s; }
.brand { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0; }
.brand h1 { font-family: var(--f-head); display: flex; align-items: baseline; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
.brand h1 .ar { font-weight: 400; font-size: 18px; color: var(--ink-2); margin-inline-start: 8px; }
.brand p { margin: 0; color: var(--ink-3); font-size: 13.5px; }

.clock { display: flex; align-items: center; gap: 22px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.clock .yr { font-family: var(--f-head); font-size: 30px; font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.clock .yr { display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.clock .yr .ycert, .clock .dtc { font-family: var(--f-body); font-size: 11.5px; font-style: italic; font-weight: 400; color: var(--ink-3); letter-spacing: 0; text-transform: none; line-height: 1; min-height: 1em; }
.clock .dtc:not(:empty)::before { content: "· "; font-style: normal; margin-inline-start: 5px; }
.clock .yr small { font-family: var(--f-body); font-size: 13px; font-weight: 500; color: var(--ink-2); margin-inline-start: 5px; letter-spacing: 0; }
.period { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 3px; background: color-mix(in srgb, var(--per, var(--ink-3)) 15%, transparent); color: var(--per, var(--ink-2)); font-size: 13px; font-weight: 600; white-space: nowrap; }
.period::before { content: none; }
.clock dl { display: flex; margin: 0; }
.clock dl div { display: flex; flex-direction: column; gap: 3px; padding-inline: 16px; border-inline-start: 1px solid var(--rule); }
.clock dt { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); font-weight: 600; }
.clock dd { margin: 0; font-weight: 600; font-size: 16px; color: var(--ink); white-space: nowrap; }
.clock dd .pl { display: inline-flex; align-items: center; gap: 5px; }
.clock dd .pl svg { width: 12px; height: 12px; fill: var(--per, var(--ink-2)); }
/* one-row header (title left; period, year, Hijri, Age, Living in and the switches right). Every stat has a fixed width so nothing moves between events. */
header.top { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px 28px; }
header.top .brand { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
header.top .right { flex: none; flex-wrap: nowrap; gap: 24px; }
.clock { flex-wrap: nowrap; gap: 18px; min-width: 0; }
.clock .period { width: 150px; justify-content: center; flex: none; }
.clock .yr { width: 96px; flex: none; }
.clock dl div { flex: none; min-width: 0; box-sizing: border-box; }
.clock dl div:nth-child(1) { width: 92px; } .clock dl div:nth-child(2) { width: 140px; } .clock dl div:nth-child(3) { width: 196px; }
.clock dd { overflow: hidden; text-overflow: ellipsis; }
.clock dd .pl { display: flex; min-width: 0; } .clock dd .pl svg { flex: none; } .clock dd .pl > span { overflow: hidden; text-overflow: ellipsis; }
#tagline { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 1640px) { #tagline, #altName { display: none; } }
/* medium screens: not enough room for one row, so a fixed two-row layout */
@media (min-width: 861px) and (max-width: 1239px) {
  header.top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand ctrls" "clock clock"; }
  header.top .brand { grid-area: brand; } header.top .right { display: contents; } header.top .ctrls { grid-area: ctrls; } header.top .clock { grid-area: clock; }
}

.mapwrap { grid-column: 1; grid-row: 2; min-height: 0; position: relative; }
#map { position: absolute; inset: 0; background: var(--sea); }
.leaflet-container { background: var(--sea); font-family: var(--f-body); }
.land { fill: var(--land); fill-opacity: 1; stroke: var(--coast); stroke-width: .7; }
.lake { fill: var(--sea); fill-opacity: 1; stroke: var(--coast); stroke-width: .5; }
.river { stroke: var(--river); stroke-width: 1.1; fill: none; }
.leaflet-bar { border: 1px solid var(--rule) !important; box-shadow: none !important; border-radius: 4px !important; }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--ink-2) !important; border-color: var(--rule) !important; font-weight: 400 !important; }
.leaflet-control-attribution { background: transparent !important; color: var(--ink-3) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--ink-3) !important; }

.region { font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; pointer-events: none; transform: translate(-50%,-50%); font-weight: 500; }
.region.sea { font-family: var(--f-head); font-style: italic; letter-spacing: .14em; text-transform: none; font-size: 11.5px; font-weight: 400; color: color-mix(in srgb, var(--ink-3) 85%, var(--sea)); }

/* places: ink only. filled = known, ring = approximate, dotted ring = disputed */
.pin { width: 10px; height: 10px; margin: 2px; box-sizing: border-box; background: var(--ink-2); border: 1.5px solid var(--land); outline: 1px solid color-mix(in srgb, var(--ink-2) 40%, transparent); transform: rotate(45deg); cursor: pointer; transition: transform .2s, opacity .2s; }
.pin.approx, .pin.disputed { background: var(--land); border: 1.5px solid var(--ink-2); outline: none; }
.pin.disputed { border-style: dashed; }
.pin.past { opacity: .55; transform: rotate(45deg) scale(.85); }
.pin.current { transform: rotate(45deg) scale(1.45); opacity: 1; background: var(--ink); }
.pin.current.approx, .pin.current.disputed { background: var(--land); border-color: var(--ink); }


.pinlabel { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); white-space: nowrap; color: var(--ink); background: var(--surface); border-radius: 3px; padding: 2px 8px; box-shadow: 0 1px 4px rgba(0,0,0,.18); font-size: 12.5px; font-weight: 600; pointer-events: none;
  text-shadow: 0 0 2px var(--land), 0 0 2px var(--land), 0 0 4px var(--land), 0 0 6px var(--land); }

.prophet { width: 20px; height: 26px; position: relative; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.prophet svg { display: block; width: 20px; height: 26px; }
.prophet .body { fill: var(--gold); stroke: var(--land); stroke-width: 1.5; }
.prophet .hole { fill: var(--land); }


@keyframes halo { 0% { transform: scale(.6); opacity: 1 } 100% { transform: scale(1.3); opacity: 0 } }

.route { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route.done { stroke: var(--gold); stroke-width: 2.25; }
.route.ahead { stroke: var(--ink-3); stroke-width: 1.25; stroke-dasharray: 1 5; }
.route.past { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 5; opacity: .6; }
.route.companions { stroke: var(--ink-2); stroke-dasharray: 5 4; }
.route.done.companions { stroke-width: 1.5; }
.route.miracle { stroke-dasharray: 1 6; stroke-width: 2.25; }
.route.letter { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 4; }

/* reading column */
aside.story { grid-column: 2; grid-row: 2 / 4; border-left: 1px solid var(--rule); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.card { padding: 26px 30px 24px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.photo { margin: -26px -30px 20px; position: relative; background: var(--rule); }
.photo img { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 30vh; object-fit: cover; cursor: zoom-in; }
.photo .phwrap { position: relative; display: block; }
.photo .expand { position: absolute; bottom: 8px; inset-inline-end: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 5px; background: rgba(20,18,14,.68); color: #fff; font-size: 11.5px; font-weight: 600; pointer-events: none; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.photo .expand svg { width: 11px; height: 11px; fill: currentColor; }
.photo figcaption { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 8px 30px 0; font-size: 12px; color: var(--ink-3); background: var(--surface); }
.photo figcaption .cr { font-size: 11px; white-space: nowrap; }
.photo figcaption a { color: inherit; }
.photo .pn { position: absolute; top: calc(50% - 30px); width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 18px; line-height: 34px; cursor: pointer; padding: 0; }
.photo .pn.a { inset-inline-start: 10px; } .photo .pn.b { inset-inline-end: 10px; }
.photo .dots { position: absolute; bottom: 44px; inset-inline-start: 0; inset-inline-end: 0; text-align: center; color: #fff; font-size: 11.5px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(10,10,10,.92); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card .eyebrow .kind { color: var(--ink-2); font-weight: 600; }
.card h2 { font-size: 25px !important; }
.card .eyebrow { display: flex; gap: 8px; margin-bottom: 10px; }
.card .eyebrow .sep { color: var(--rule); }
.card h2 { color: var(--gold-ink, var(--gold)); font-family: var(--f-head); font-weight: 600; font-size: 21px; letter-spacing: -.005em; line-height: 1.25; margin: 0; text-wrap: balance; }
.card .titlear { font-size: 19px; color: var(--ink-3); margin: 4px 0 16px; line-height: 1.6; text-align: right; }
.facts { display: grid; grid-template-columns: 52px 1fr; gap: 8px 12px; margin: 0 0 18px; font-size: 13.5px; }
.facts dt { padding-top: 1px; }
.datedetail { margin: -2px 0 14px; font-size: 13.5px; color: var(--ink-2); }
.facts dd.today { color: var(--ink-2); font-size: 13px; }
.facts dd { margin: 0; min-width: 0; color: var(--ink); }
.facts .note { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.cert { font-size: 12px; font-style: italic; color: var(--ink-3); margin-inline-start: 8px; white-space: nowrap; }
.cert::before { content: "·"; font-style: normal; margin-inline-end: 6px; color: var(--rule); }


.card p.summary { margin: 0 0 20px; max-width: 62ch; color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1.6; }
.dispute { margin: 0 0 18px; padding-left: 12px; border-left: 2px solid var(--ink-3); }
.dispute h3, .sources h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin: 0 0 6px; font-weight: 500; }
.dispute p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.sources ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 13px; color: var(--ink-2); }
.sources a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.sources a:hover { color: var(--ink); text-decoration-color: currentColor; }

.nav { display: flex; gap: 8px; padding: 14px 28px; border-bottom: 1px solid var(--rule); align-items: center; }
.btn { white-space: nowrap; font: inherit; font-weight: 500; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 4px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; }
.btn:hover { border-color: var(--ink-3); }
.btn:focus-visible, .ev:focus-visible, input[type=range]:focus-visible, .pin:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--surface); flex: 1; }
.btn.primary:hover { opacity: .9; }
.btn:disabled { opacity: .35; cursor: default; }
.btn svg { width: 12px; height: 12px; fill: currentColor; }
.count { margin-inline-start: auto; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-inline-start: auto; white-space: nowrap; }

.list { overflow-y: auto; flex: 1 1 auto; min-height: 0; padding: 0 0 10px; }
.story.showlist .card { display: none; } .story:not(.showlist) .list { display: none; }
.nav { border-top: 1px solid var(--rule); border-bottom: 0 !important; }
.btn.toggle[aria-pressed="true"] { border-color: var(--ink); }
.list h4 { position: sticky; top: 0; background: var(--surface); margin: 0; padding: 14px 28px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); font-weight: 600; z-index: 1; }
.list h4.mk { color: var(--mk); } .list h4.md { color: var(--md); }
/* event list as a vertical timeline: year | line with a node | title and type */
.ev { position: relative; display: grid; grid-template-columns: 58px 1fr; width: 100%; text-align: start; font: inherit; background: none; border: 0; border-inline-start: 3px solid transparent; color: var(--ink-2); padding: 0 28px 0 25px; cursor: pointer; }
.ev .y { padding: 9px 0; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink-3); text-align: end; padding-inline-end: 10px; }
.ev .rail { display: none; }


.ev .tx { padding: 8px 0 9px; padding-inline-start: 12px; min-width: 0; display: flex; flex-direction: column; gap: 1px; border-inline-start: 1px solid var(--rule); }
.ev .t { font-size: 14px; line-height: 1.4; }
.ev .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.ev:hover .t { color: var(--ink); }

.ev.future { color: var(--ink-3); }
.ev.on { background: color-mix(in srgb, var(--gold) 9%, transparent); border-inline-start-color: var(--gold); }
.ev.on .t { color: var(--ink); font-weight: 600; }
.ev.on .tx { border-inline-start-color: transparent; }
.ev.on .y { color: var(--ink); font-weight: 600; }
html[lang="ar"] .ev .k { text-transform: none; letter-spacing: 0; font-size: 12px; }


/* timeline */
.timeline { grid-column: 1; grid-row: 3; background: var(--surface); border-top: 1px solid var(--rule); padding-block: 12px 14px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.tl-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.tl-head .hint { font-size: 12px; color: var(--ink-3); margin-inline-start: auto; }
/* Play was removed (yousef: nobody will use it); stepping is Next/Previous, the timeline handle and the arrow keys */
#playBtn { display: none; }
/* no rubber-band gap past the end of the page on phones, and the same colour if a browser still shows one */
html { overscroll-behavior-y: none; background: var(--bg); }
@media (max-width: 860px) { .tl-head { display: none; } html { background: var(--surface); } }
.kbd { font-size: 11px; border: 1px solid var(--rule); border-radius: 3px; padding: 0 4px; color: var(--ink-2); }
.rail { position: relative; height: 60px; }
.eras { position: absolute; left: 0; right: 0; top: 0; height: 16px; }
.era { position: absolute; top: 0; height: 16px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); border-left: 1px solid var(--rule); padding-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.track { position: absolute; left: 0; right: 0; top: 31px; height: 2px; background: var(--rule); }
.track .fill { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; background: var(--ink-2); }
.ticks { position: absolute; left: 0; right: 0; top: 26px; height: 12px; pointer-events: none; }
.tick { position: absolute; top: 2px; width: 1px; height: 8px; margin-inline-start: -.5px; background: color-mix(in srgb, var(--ink-3) 70%, transparent); }
.tick.past { background: var(--ink-2); }
.tick.on { top: -3px; width: 3px; height: 18px; margin-inline-start: -1.5px; border-radius: 2px; background: var(--gold); }
.years { position: absolute; left: 0; right: 0; top: 43px; height: 16px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.years span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.years span.hj { color: var(--ink); font-weight: 600; }
#scrub { position: absolute; left: -8px; right: -8px; width: calc(100% + 16px); top: 18px; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
#scrub::-webkit-slider-runnable-track { height: 28px; background: transparent; }
#scrub::-moz-range-track { height: 28px; background: transparent; }
#scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 6px; height: 24px; margin-top: 2px; border-radius: 2px; background: var(--gold); border: 0; box-shadow: 0 0 0 2px var(--surface), 0 1px 4px rgba(0,0,0,.3); }
#scrub::-moz-range-thumb { width: 6px; height: 24px; border-radius: 2px; background: var(--gold); border: 0; box-shadow: 0 0 0 2px var(--surface), 0 1px 4px rgba(0,0,0,.3); }

.legend { position: absolute; z-index: 500; left: 12px; bottom: 22px; max-width: min(320px, calc(100% - 24px)); background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; font-size: 12px; color: var(--ink-2); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.legend summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.legend summary::-webkit-details-marker { display: none; }
.legend summary::after { content: "+"; color: var(--ink-3); }
.legend[open] summary::after { content: "–"; }
.legend .rows { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px; margin-top: 8px; }
html[dir="rtl"] .legend { left: auto; right: 12px; }
.sitenote { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; margin: 22px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; display: inline-block; box-sizing: border-box; transform: rotate(45deg); margin: 0 2px; }
.legend i.k { background: var(--ink-2); }
.legend i.a { border: 1.5px solid var(--ink-2); }
.legend i.d { border: 1.5px dashed var(--ink-2); }


.legend i.p { transform: none; width: 12px; height: 15px; margin: 0; background: none; }
.legend i.p svg { width: 12px; height: 15px; display: block; }


@media (max-width: 860px) {
  html, body { height: auto; }
  .app { height: auto; grid-template-columns: minmax(0,1fr); grid-template-rows: auto; }
  .clock { gap: 12px 16px; } .clock .yr { font-size: 24px; } .clock dl div { padding-inline: 10px; } .clock dl div:first-child { border: 0; padding-inline-start: 0; } .clock dd { font-size: 14.5px; }
  .mapwrap { grid-column: 1; grid-row: auto; height: 56vh; min-height: 320px; }
  .legend { bottom: 18px; } .legend:not([open]) .rows { display: none; }
  .timeline { grid-column: 1; grid-row: auto; }
  aside.story { grid-column: 1; grid-row: auto; border-left: 0; }
  .photo { margin-left: calc(-1 * max(20px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(20px, env(safe-area-inset-right, 0px))); }
  .story .card { flex: none; } .card { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .nav, .sitenote { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .list { flex: none; max-height: 50vh; }
  .list h4 { padding-left: max(20px, env(safe-area-inset-left, 0px)); }
  .ev { padding-left: max(18px, env(safe-area-inset-left, 0px)); }
  .tl-head .hint { display: none; }
  .era { font-size: 9.5px; }
  /* phone: keep Previous / Next / All events within thumb reach */
  .nav { position: sticky; bottom: 0; z-index: 1002; background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding-top: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 18px rgba(0,0,0,.08); }
  .nav .btn { min-height: 44px; }
  /* sticky, not fixed: stays at the bottom of the screen while reading, and ends with the page, so no empty space below it */
  :root { padding-bottom: 0 !important; }
  /* phone: compact header, map pinned at the top, event text scrolls right under it */
  header.top { position: relative; padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  header.top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand ctrls" "clock clock"; }
  header.top .brand { grid-area: brand; flex-wrap: nowrap; white-space: nowrap; gap: 10px; } header.top .right { display: contents; } header.top .ctrls { grid-area: ctrls; } header.top .clock { grid-area: clock; }
  #tagline, .brand h1 .ar, .brand h1 .alt, #altName { display: none; }
  .brand h1, html[lang="ar"] .brand h1 > span:first-child { font-size: 17px; white-space: nowrap; }
  #mapName { flex: none; }
  .brand { gap: 12px; }
  .clock { flex-wrap: wrap; gap: 10px 14px; }
  .clock .period { width: auto; } .clock .yr { width: auto; min-width: 84px; }
  .clock dl { width: 100%; } .clock dl div { box-sizing: border-box; } .clock dl div:nth-child(1) { width: 26%; } .clock dl div:nth-child(2) { width: 30%; } .clock dl div:nth-child(3) { width: 44%; }
  header.top { align-items: start; }
  /* phone: smaller, softer header controls */
  .ctrls .langs { border-radius: 999px; }
  .ctrls .langs button { padding: 3px 10px; font-size: 11.5px; min-height: 26px; }
  .ctrls .sound { width: 28px; height: 28px; border-radius: 999px; }
  .ctrls .sound svg { width: 13px; height: 13px; }
  header.top .clock .period { padding: 3px 10px; font-size: 11.5px; border-radius: 999px; }
  .clock .yr { font-size: 18px; order: -1; min-width: 0 !important; flex-direction: row; align-items: baseline; gap: 8px; }
  .clock .yr small { font-size: 11px; }
  .clock .period { margin-inline-start: auto; }
}
@media (max-width: 440px) { #mapName .pfx { display: none; } }
@media (max-width: 360px) { .brand h1, html[lang="ar"] .brand h1 > span:first-child { font-size: 15px !important; } .ctrls .langs button { padding: 3px 7px !important; } .ctrls { gap: 5px !important; } .homebtn { width: 26px; height: 26px; } header.top .brand { gap: 8px; } }
@media (max-width: 400px) { .clock dd { font-size: 14px !important; } .clock dl div { padding-inline: 8px !important; } .clock dl div:nth-child(1) { width: 22% !important; } .clock dl div:nth-child(2) { width: 38% !important; } .clock dl div:nth-child(3) { width: 40% !important; } #prevBtn span { display: none; } #prevBtn { padding: 0 14px; } .nav .btn { padding-inline: 12px; } }
@media (max-width: 860px) {
  .card { display: flex; flex-direction: column; }
  /* phone order: title, a short photo strip (tap to enlarge), the main text, then the facts */
  .card > * { order: 4; }
  .card > .eyebrow, .card > h2, .card > .titlear, .card > .datedetail { order: 0; }
  .card > .photo { order: 1; margin: 4px 0 16px; border-radius: 8px; overflow: hidden; background: none; }
  .card > .photo img { aspect-ratio: auto; height: 112px; max-height: none; border-radius: 8px; }
  .card > .photo figcaption { padding: 6px 0 0; background: none; }
  .card > .photo .pn { top: 39px; width: 30px; height: 30px; line-height: 30px; }
  .card > .photo .dots { bottom: auto; top: 88px; }
  .card > .summary { order: 2; }
  .card > .facts { order: 3; }
  .nav { gap: 6px; }
  header.top { position: sticky; top: var(--hdr-top, 0px); z-index: 6; }
  .mapwrap { position: sticky; top: var(--map-top, 0px); z-index: 5; height: 32vh; height: 32svh; min-height: 190px; box-shadow: 0 6px 14px rgba(0,0,0,.10); }
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 1001; background: var(--surface); }
@media (prefers-reduced-motion: reduce) { .prophet .halo { animation: none; opacity: .6; } .pin { transition: none; } }


/* language switch, period bands, right-to-left */
.ctrls { display: inline-flex; align-items: center; gap: 8px; }
.sound { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--rule); border-radius: 4px; background: none; color: var(--ink-3); cursor: pointer; }
.sound:hover { color: var(--ink); }
.sound svg { width: 16px; height: 16px; } .sound .spk { fill: currentColor; }
.sound[aria-pressed="true"] .off, .sound[aria-pressed="false"] .on { display: none; }
.homebtn { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-2); cursor: pointer; align-self: center; }
.homebtn:hover { color: var(--ink); background: color-mix(in srgb, var(--gold) 22%, transparent); }
.homebtn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.homebtn svg { width: 13px; height: 13px; fill: currentColor; }
.brand { align-items: center !important; }
.langs { display: inline-flex; gap: 0; padding: 0; border: 0; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.langs button { border-radius: 999px !important; }
.sound { border-radius: 999px !important; }
.langs button { font: inherit; font-size: 12.5px; font-weight: 500; background: none; border: 0; padding: 5px 10px; color: var(--ink-3); cursor: pointer; min-height: 30px; }
.langs button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.langs button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.langs button.ar-btn { font-family: "IBM Plex Sans Arabic", var(--f-ar); }
.right { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.bands { position: absolute; left: 0; right: 0; top: 0; height: 16px; }
.band { position: absolute; top: 0; height: 16px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); padding-inline-start: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; border-inline-start: 1px solid var(--rule); }
.band.mk { color: var(--mk); border-color: var(--mk); font-weight: 600; }
.band.md { color: var(--md); border-color: var(--md); font-weight: 600; }
.bandfill { position: absolute; top: 22px; height: 18px; }
.bandfill.mk { background: color-mix(in srgb, var(--mk) 13%, transparent); }
.bandfill.md { background: color-mix(in srgb, var(--md) 13%, transparent); }
html[lang="ar"] body, html[lang="ar"] .btn, html[lang="ar"] .ev { font-family: "IBM Plex Sans Arabic", var(--f-body); }
html[lang="ar"] .cap, html[lang="ar"] .band, html[lang="ar"] .clock dt, html[lang="ar"] .list h4, html[lang="ar"] .region { letter-spacing: 0; text-transform: none; }
html[lang="ar"] .cap, html[lang="ar"] .band, html[lang="ar"] .clock dt, html[lang="ar"] .list h4 { font-size: 12px; }
html[lang="ar"] .region { font-size: 12.5px; letter-spacing: .04em; }
html[lang="ar"] .card h2 { font-family: var(--f-ar); font-weight: 700; font-size: 28px !important; line-height: 1.5; letter-spacing: 0; }
html[lang="ar"] .brand h1 > span:first-child { font-family: var(--f-ar); font-size: 21px; font-weight: 700; }
html[lang="ar"] .clock .yr { font-family: "IBM Plex Sans Arabic", var(--f-body); }
html[lang="ar"] .card .titlear { text-align: left; direction: ltr; font-family: var(--f-body); font-size: 13.5px; color: var(--ink-3); }
html[lang="ar"] .dispute p { line-height: 1.85; font-size: 15px; }
html[lang="ar"] .card p.summary { line-height: 1.9; font-size: 17px; font-weight: 600; }
html[lang="ar"] .brand h1 .ar { font-family: var(--f-body); font-size: 13.5px; }
html[dir="rtl"] .btn svg { transform: scaleX(-1); }
.brand h1 .alt { margin: 0; font-weight: 400; font-size: 14px; color: var(--ink-3); }
.brand h1 .alt.ar { font-family: var(--f-ar); font-size: 17px; }

html[dir="rtl"] .pinlabel { left: auto; right: 20px; }
html[dir="rtl"] .dispute { padding-left: 0; padding-right: 12px; border-left: 0; border-right: 2px solid var(--ink-3); }
html[dir="rtl"] aside.story { border-left: 0; border-right: 1px solid var(--rule); }
#map { direction: ltr; }
@media (max-width: 860px) { html[dir="rtl"] aside.story { border-right: 0; } html[dir="rtl"] .ev { padding-right: max(20px, env(safe-area-inset-right, 0px)); } }

/* ---------- landing: a home screen of prophets' journeys ---------- */
.landing { min-height: 100%; background: var(--bg); padding-block: 0 48px; }
.landing .lbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 16px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--rule); background: var(--surface); }
.landing .lbar .mark { font-family: var(--f-head); font-weight: 600; font-size: 17px; }
.landing .inner { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.lhero { padding-block: 48px 28px; display: grid; gap: 14px; }
.lhero .eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.lhero h2 { font-family: var(--f-head); font-weight: 600; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.lhero p { margin: 0; color: var(--ink-2); font-size: 16px; max-width: 60ch; }
.lhero .cta { justify-self: start; margin-top: 8px; display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 600; font-size: 15px; padding: 12px 18px; border-radius: 6px; border: 0; background: var(--ink); color: var(--surface); cursor: pointer; text-decoration: none; }
.lhero .cta svg { width: 14px; height: 14px; fill: currentColor; }
html[dir="rtl"] .lhero .cta svg { transform: scaleX(-1); }
.lhero { justify-items: center; text-align: center; padding-block: 44px 26px; }
.lhero h2 { max-width: 22ch; font-size: clamp(26px, 3.4vw, 38px); }
.spot { position: relative; display: grid; justify-items: center; text-align: center; gap: 8px; max-width: 760px; margin: 0 auto 40px; padding: 40px 28px 34px; border-radius: 20px; border: 1.5px solid var(--gold); text-decoration: none; color: var(--ink);
  background: radial-gradient(ellipse 70% 85% at 50% 0%, color-mix(in srgb, var(--gold) 24%, var(--surface)), var(--surface) 72%);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 9%, transparent), 0 18px 50px color-mix(in srgb, var(--gold) 18%, transparent); transition: box-shadow .2s, transform .2s; }
.spot:hover { transform: translateY(-2px); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 14%, transparent), 0 24px 60px color-mix(in srgb, var(--gold) 26%, transparent); }
.spot:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.spot .kick { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.spot .sname { font-family: var(--f-ar); font-size: clamp(52px, 8vw, 76px); line-height: 1.35; direction: rtl; }
.spot .sname .saw { font-size: .62em; color: var(--gold); }
.spot .sen { font-family: var(--f-head); font-size: clamp(20px, 2.4vw, 25px); font-weight: 600; }
.spot .smeta { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.spot .slead { font-size: 15.5px; color: var(--ink-2); max-width: 52ch; margin-top: 6px; }
.spot .scta { margin-top: 14px; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 8px; background: var(--ink); color: var(--surface); }
.spot .scta svg { width: 13px; height: 13px; fill: currentColor; }
html[dir="rtl"] .spot .scta svg { transform: scaleX(-1); }
html[lang="ar"] .spot .kick { letter-spacing: 0; text-transform: none; font-size: 14px; }
html[lang="ar"] .spot .sen { font-family: var(--f-ar); font-weight: 700; }
.ghead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 18px 0 14px; border-top: 1px solid var(--rule); padding-top: 18px; }
.ghead h3 { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.ghead span { font-size: 12.5px; color: var(--ink-3); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 138px; padding: 14px 14px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--rule); color: var(--ink-3); text-align: start; font: inherit; }
.tile .n { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--ink-3); display: flex; justify-content: space-between; align-items: center; }
.tile .n svg { width: 13px; height: 13px; fill: var(--ink-3); }
.tile .arn { font-family: var(--f-ar); font-size: 27px; line-height: 1.3; color: var(--ink-2); direction: rtl; text-align: right; }
.tile .arn small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.tile .en { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.tile .soon { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.tile.locked { background: color-mix(in srgb, var(--surface) 55%, var(--bg)); }
.tile.locked .arn, .tile.locked .en { opacity: .72; }
.tile.open { grid-column: span 2; cursor: pointer; border: 1.5px solid var(--gold); background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 16%, var(--surface)), var(--surface) 70%); color: var(--ink); text-decoration: none; }
.tile.open:hover { box-shadow: 0 6px 22px color-mix(in srgb, var(--gold) 22%, transparent); }
.tile.open:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.tile.open .arn { color: var(--ink); font-size: 34px; }
.tile.open .en { color: var(--ink); font-size: 15px; }
.tile.open .meta { font-size: 12.5px; color: var(--ink-2); }
.tile.open .go { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.tile.open .go svg { width: 11px; height: 11px; fill: currentColor; }
html[dir="rtl"] .tile.open .go svg { transform: scaleX(-1); }
.lnote { margin-top: 22px; font-size: 12.5px; color: var(--ink-3); max-width: 70ch; }
.contact { margin-top: 44px; border-top: 1px solid var(--rule); padding-top: 26px; }
.contact h3 { margin: 0 0 6px; font-family: var(--f-head); font-size: 22px; font-weight: 600; }
html[lang="ar"] .contact h3 { font-family: var(--f-ar); font-size: 26px; }
.contact > p { margin: 0 0 16px; color: var(--ink-2); max-width: 62ch; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cgrid a { display: grid; gap: 6px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.cgrid a:hover { border-color: var(--gold); }
.cgrid a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.cgrid b { font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cgrid b svg { width: 12px; height: 12px; fill: var(--gold); flex: none; }
html[dir="rtl"] .cgrid b svg { transform: scaleX(-1); }
.cgrid span { font-size: 13.5px; color: var(--ink-2); }
.cmail { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.cmail a { color: inherit; }
.report { display: inline-block; margin: 14px 0 0; font-size: 12.5px; color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.report:hover { color: var(--ink); }
.contact[hidden], .report[hidden] { display: none !important; }
html[lang="ar"] .lhero h2 { font-family: var(--f-ar); font-weight: 700; line-height: 1.4; }
html[lang="ar"] .lhero .eyebrow, html[lang="ar"] .ghead h3, html[lang="ar"] .tile .soon, html[lang="ar"] .tile.open .go { letter-spacing: 0; text-transform: none; font-size: 13px; }
html[lang="ar"] .tile .en { font-weight: 500; font-size: 12.5px; }
.backlink { font: inherit; font-size: 12.5px; color: var(--ink-3); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.backlink:hover { color: var(--ink); }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile.open { grid-column: 1 / -1; } }

/* desktop: larger reading type that grows with the screen, so short events fill the panel instead of leaving it blank */
@media (min-width: 861px) {
  .story .card { display: flex; flex-direction: column; padding: clamp(26px, 2.4vw, 44px) clamp(30px, 2.6vw, 52px) 0; }
  .story .card > * { flex: none; }
  .card h2 { font-size: clamp(27px, 2vw, 52px) !important; }
  html[lang="ar"] .card h2 { font-size: clamp(30px, 2.2vw, 56px) !important; }
  .card .titlear { font-size: clamp(19px, 1.3vw, 34px); }
  .card .eyebrow { font-size: clamp(11px, .7vw, 17px); margin-bottom: clamp(8px, .8vw, 14px); }
  .card .datedetail { font-size: clamp(14px, .9vw, 22px); margin-bottom: clamp(14px, 1.3vw, 22px); }
  .card .facts { font-size: clamp(14px, .9vw, 22px); grid-template-columns: clamp(52px, 4.2vw, 76px) 1fr; margin-bottom: clamp(18px, 1.8vw, 30px); }
  .card .facts dd.today { font-size: clamp(14px, .9vw, 22px); }
  .card .facts .note { font-size: clamp(12.5px, .8vw, 19px); }
  .card p.summary { font-size: clamp(17px, 1.2vw, 30px); line-height: 1.6; max-width: 46ch; margin-bottom: clamp(20px, 2vw, 34px); }
  html[lang="ar"] .card p.summary { font-size: clamp(18px, 1.3vw, 32px); line-height: 1.9; }
  .card .dispute { margin-bottom: clamp(18px, 1.8vw, 30px); padding-inline-start: 16px; }
  .card .dispute p { font-size: clamp(14px, .95vw, 23px); line-height: 1.65; max-width: 62ch; }
  .card .dispute h3, .card .sources h3 { font-size: clamp(11px, .7vw, 16px); margin-bottom: 8px; }
  .card .sources ul { font-size: clamp(13.5px, .88vw, 21px); gap: .45em; }
  .upnext { margin-top: auto !important; display: flex; flex-direction: column; gap: 4px; width: calc(100% + 2 * clamp(30px, 2.6vw, 52px)); margin-inline: calc(-1 * clamp(30px, 2.6vw, 52px)); padding: 16px clamp(30px, 2.6vw, 52px); border: 0; border-top: 1px solid var(--rule); background: none; font: inherit; color: var(--ink-2); text-align: start; cursor: pointer; }
  .upnext:hover { background: color-mix(in srgb, var(--gold) 7%, transparent); color: var(--ink); }
  .upnext .cap { font-size: clamp(11px, .65vw, 15px); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
  html[lang="ar"] .upnext .cap { letter-spacing: 0; font-size: 12px; }
  .upnext .t { font-family: var(--f-head); font-size: clamp(15px, 1vw, 25px); font-weight: 600; }
  html[lang="ar"] .upnext .t { font-family: var(--f-ar); font-size: clamp(17px, 1.15vw, 21px); }
  .card > .upnext:first-child { margin-top: 0 !important; }
  .card .photo + * { margin-top: 0; }
  .story .card > .photo { margin: calc(-1 * clamp(26px, 2.4vw, 44px)) calc(-1 * clamp(30px, 2.6vw, 52px)) clamp(20px, 1.8vw, 30px); }
  .story .card > .photo figcaption { padding-inline: clamp(30px, 2.6vw, 52px); }
}
@media (max-width: 860px) { .upnext { display: none; } }
