/* Gaza Genocide Museum — timeline [gm_timeline] */
.gmtl {
	--gmtl-top: 96px;            /* space under the fixed site header */
	--bg: #efeeec;
	--card: #f7f7f6;
	--ink: #141414;
	--muted: #3a3a3a;
	--soft: rgba(20, 20, 20, .14);
	--ph: #d3d3d3;
	--badge-bg: #141414;
	--badge-fg: #fff;
	--shadow: 0 12px 30px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .05);
	position: relative;
	overflow-x: clip;
	background:
		radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, .7), transparent 55%),
		radial-gradient(ellipse at 90% 60%, rgba(255, 255, 255, .5), transparent 50%),
		var(--bg);
	color: var(--ink);
	padding: clamp(48px, 7vw, 92px) 0 clamp(80px, 9vw, 130px);
	line-height: 1.7;
	font-family: inherit;
	isolation: isolate;
	overflow-wrap: break-word; /* never split an Arabic word in two */
	word-break: normal;
}
.gmtl--dark {
	--bg: #070707;
	--card: #151515;
	--ink: #f1f1f1;
	--muted: #c9c9c9;
	--soft: rgba(255, 255, 255, .16);
	--ph: #262626;
	--badge-bg: #f1f1f1;
	--badge-fg: #0b0b0b;
	--shadow: 0 12px 30px rgba(0, 0, 0, .5);
	background: var(--bg);
}
body.admin-bar .gmtl { --gmtl-top: 128px; }
@media (max-width: 900px) {
	.gmtl { --gmtl-top: 84px; }
	body.admin-bar .gmtl { --gmtl-top: 130px; }
}
.gmtl *, .gmtl *::before, .gmtl *::after { box-sizing: border-box; }

/* decorative grey pixels in the corners */
.gmtl .gmtl-deco { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.gmtl .gmtl-deco i { position: absolute; display: block; background: var(--ink); opacity: .08; }
.gmtl .gmtl-deco i:nth-child(1) { width: 46px; height: 46px; top: 18px; inset-inline-end: 7%; }
.gmtl .gmtl-deco i:nth-child(2) { width: 30px; height: 30px; top: 64px; inset-inline-end: calc(7% + 46px); opacity: .05; }
.gmtl .gmtl-deco i:nth-child(3) { width: 22px; height: 22px; top: 2px; inset-inline-end: calc(7% - 22px); opacity: .12; }
.gmtl .gmtl-deco i:nth-child(4) { width: 64px; height: 64px; bottom: 40px; inset-inline-start: 4%; }
.gmtl .gmtl-deco i:nth-child(5) { width: 34px; height: 34px; bottom: 104px; inset-inline-start: calc(4% + 64px); opacity: .05; }
.gmtl .gmtl-deco i:nth-child(6) { width: 26px; height: 26px; bottom: 14px; inset-inline-end: 12%; opacity: .1; }

/* heading */
.gmtl .gmtl-head { text-align: center; padding: 0 16px; margin: 0 auto 8px; max-width: 900px; }
.gmtl .gmtl-title { margin: 0; font-size: clamp(36px, 6vw, 60px); font-weight: 800; line-height: 1.2; color: var(--ink); display: inline-flex; align-items: center; gap: .3em; }
.gmtl .gmtl-title .gmtl-sq { width: .3em; height: .3em; }
.gmtl .gmtl-sub { margin: 14px 0 0; display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--muted); font-size: clamp(16px, 2vw, 21px); font-weight: 600; }
.gmtl .gmtl-sub::before, .gmtl .gmtl-sub::after { content: ""; flex: 0 1 110px; height: 1.5px; background: var(--ink); opacity: .7; }
.gmtl .gmtl-sq { display: inline-block; flex-shrink: 0; width: .62em; height: .62em; background: var(--c, var(--gmtl-accent, #c8102e)); }

/* sticky bar of years */
.gmtl .gmtl-years {
	position: sticky; top: var(--gmtl-top); z-index: 20;
	width: min(1100px, calc(100% - 32px)); margin: 30px auto 6px;
	background: color-mix(in srgb, var(--bg) 86%, transparent);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border: 1px solid var(--soft); border-radius: 99px; padding: 5px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}
.gmtl .gmtl-years-in { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.gmtl .gmtl-years-in::-webkit-scrollbar { display: none; }
.gmtl .gmtl-years a {
	flex-shrink: 0; padding: 5px 13px; border-radius: 99px;
	font-size: 14px; font-weight: 700; line-height: 1.5; font-variant-numeric: lining-nums tabular-nums;
	color: var(--muted); text-decoration: none !important; border: 0; transition: background .2s, color .2s;
}
.gmtl .gmtl-years a:hover { color: var(--ink); background: var(--soft); }
.gmtl .gmtl-years a.is-on { background: var(--ink); color: var(--bg); }

/* the line */
.gmtl .gmtl-body { position: relative; max-width: 1140px; margin: 0 auto; padding: 34px 20px 0; }
.gmtl .gmtl-line { position: absolute; top: 34px; bottom: 90px; inset-inline-start: 50%; width: 2px; margin-inline-start: -1px; background: var(--ink); }
.gmtl .gmtl-fill { position: absolute; top: 0; inset-inline: 0; height: var(--p, 0%); background: var(--gmtl-accent, #c8102e); }
.gmtl .gmtl-end { position: relative; height: 90px; }
.gmtl .gmtl-end::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 50%; margin-inline-start: -1.5px; border-inline-start: 3px dotted var(--ink); }

.gmtl .gmtl-list { list-style: none; margin: 0; padding: 0; position: relative; }
.gmtl .gmtl-list > li { list-style: none; margin: 0; padding: 0; }
.gmtl .gmtl-list > li::before, .gmtl .gmtl-list > li::marker { content: none; }

/* era heading */
.gmtl .gmtl-list > .gmtl-era { display: flex; justify-content: center; margin: 70px 0 26px; position: relative; z-index: 2; }
.gmtl .gmtl-list > .gmtl-era:first-child { margin-top: 10px; }
.gmtl .gmtl-era h3 {
	margin: 0; max-width: 620px; text-align: center; background: var(--bg);
	font-size: clamp(19px, 2.4vw, 27px); font-weight: 800; line-height: 1.45; color: var(--ink);
	padding: 14px 22px; border: 2px solid var(--ink);
}
.gmtl .gmtl-era h3::after { content: ""; display: block; width: 44px; height: 4px; margin: 10px auto 0; background: var(--gmtl-accent, #c8102e); }

/* year badge */
.gmtl .gmtl-list > .gmtl-year { display: flex; justify-content: center; margin: 46px 0 16px; position: relative; z-index: 2; scroll-margin-top: calc(var(--gmtl-top) + 70px); }
.gmtl .gmtl-era + .gmtl-year { margin-top: 10px; }
.gmtl .gmtl-year span {
	background: var(--badge-bg); color: var(--badge-fg);
	font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; line-height: 1.25; letter-spacing: .02em;
	padding: 6px 16px; font-variant-numeric: lining-nums tabular-nums;
}

/* small marker on the line (e.g. a month) */
.gmtl .gmtl-list > .gmtl-mark { display: flex; justify-content: center; margin: 26px 0 8px; position: relative; z-index: 2; }
.gmtl .gmtl-mark span { background: var(--bg); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 99px; padding: 2px 14px; font-size: 14px; font-weight: 700; line-height: 1.6; }

/* one step */
.gmtl .gmtl-list > .gmtl-ev { position: relative; display: flex; margin: 0 0 22px; }
.gmtl .gmtl-ev.gmtl-side-a { justify-content: flex-end; }
.gmtl .gmtl-ev.gmtl-side-b { justify-content: flex-start; }
.gmtl .gmtl-node { position: absolute; top: 30px; inset-inline-start: 50%; width: 11px; height: 11px; margin-inline-start: -5.5px; background: var(--ink); z-index: 1; }
.gmtl .gmtl-ev::after { content: ""; position: absolute; top: 35px; height: 1.5px; width: 34px; background: var(--ink); opacity: .35; }
.gmtl .gmtl-side-a::after { inset-inline-end: calc(50% - 40px); }
.gmtl .gmtl-side-b::after { inset-inline-start: calc(50% - 40px); }

.gmtl .gmtl-card {
	position: relative; width: calc(50% - 44px);
	display: flex; gap: 16px; align-items: flex-start;
	background: var(--card); border-radius: 16px; box-shadow: var(--shadow);
	padding: 20px 22px;
	transition: transform .35s ease, box-shadow .35s ease, opacity .6s ease;
}
.gmtl .gmtl-card:hover { transform: translateY(-3px); }
.gmtl .gmtl-txt { flex: 1; min-width: 0; }
.gmtl .gmtl-ev-title { margin: 0 0 4px; display: flex; align-items: flex-start; gap: .45em; font-size: clamp(17px, 1.6vw, 21px); font-weight: 800; line-height: 1.4; color: var(--ink); }
.gmtl .gmtl-ev-title .gmtl-sq { margin-top: .42em; width: .58em; height: .58em; }
.gmtl .gmtl-date { margin: 0 0 8px; font-size: 13.5px; font-weight: 700; color: var(--c, var(--gmtl-accent, #c8102e)); line-height: 1.5; }
.gmtl .gmtl-text { font-size: 15px; line-height: 1.8; color: var(--muted); }
.gmtl .gmtl-text p { margin: 0 0 .5em; }
.gmtl .gmtl-text p:last-child { margin-bottom: 0; }
.gmtl .gmtl-text a { color: inherit; font-size: .9em; font-weight: 600; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; opacity: .85; }
.gmtl .gmtl-text a:hover { color: var(--c, var(--gmtl-accent, #c8102e)); opacity: 1; }

/* image */
.gmtl .gmtl-img { flex: 0 0 clamp(110px, 36%, 210px); margin: 0; aspect-ratio: 8 / 7; border-radius: 6px; overflow: hidden; background: var(--ph); position: relative; z-index: 1; }
.gmtl .gmtl-zoom { display: block; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in; }
.gmtl .gmtl-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gmtl .gmtl-zoom:hover img { transform: scale(1.04); }
.gmtl .gmtl-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; text-decoration: none !important; font-size: 12px; font-weight: 700; border: 2px dashed rgba(255, 255, 255, .6); }
.gmtl--dark .gmtl-ph { color: #777; border-color: #3a3a3a; }
.gmtl .gmtl-ph svg { width: 40%; max-width: 54px; }

/* coloured pixels by the image, like the design */
.gmtl .gmtl-px { position: absolute; top: -10px; inset-inline-end: 18px; width: 40px; height: 44px; z-index: 2; pointer-events: none; }
.gmtl .gmtl-px i { position: absolute; display: block; background: var(--c, var(--gmtl-accent, #c8102e)); }
.gmtl .gmtl-px i:nth-child(1) { width: 15px; height: 15px; top: 0; inset-inline-end: 22px; opacity: .55; }
.gmtl .gmtl-px i:nth-child(2) { width: 20px; height: 20px; top: 12px; inset-inline-end: 0; }
.gmtl .gmtl-px i:nth-child(3) { width: 11px; height: 11px; top: 30px; inset-inline-end: 24px; opacity: .3; }
.gmtl .gmtl-ev:not(.has-img) .gmtl-px { display: none; }

/* appear while scrolling */
.gmtl.is-js .gmtl-ev .gmtl-card { opacity: 0; transform: translateY(28px); }
.gmtl.is-js .gmtl-ev.is-in .gmtl-card { opacity: 1; transform: none; }
.gmtl.is-js .gmtl-ev.is-in .gmtl-card:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) {
	.gmtl.is-js .gmtl-ev .gmtl-card { transform: none; transition: opacity .2s; }
	.gmtl .gmtl-card:hover, .gmtl .gmtl-zoom:hover img { transform: none; }
}

/* back to top */
.gmtl .gmtl-top {
	position: fixed; z-index: 30; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 20px;
	width: 46px; height: 46px; border-radius: 50%; border: 0; padding: 11px; cursor: pointer;
	background: var(--ink); color: var(--bg); box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
	opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .3s, transform .3s, visibility .3s;
}
.gmtl .gmtl-top.is-on { opacity: 1; visibility: visible; transform: none; }
.gmtl .gmtl-top svg { width: 100%; height: 100%; display: block; }

.gmtl .gmtl-empty { text-align: center; color: var(--muted); padding: 30px 16px; }

/* enlarged image */
.gmtl-lb { position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.gmtl-lb[hidden] { display: none; }
.gmtl-lb img { max-width: 94vw; max-height: 86vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.gmtl-lb button { position: absolute; top: 14px; inset-inline-end: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
	.gmtl .gmtl-card { flex-direction: column; align-items: stretch; }
	.gmtl .gmtl-txt { width: 100%; }
	.gmtl .gmtl-img { flex: none; width: 100%; aspect-ratio: 16 / 10; order: -1; }
	.gmtl .gmtl-px { top: -12px; }
}

/* ---------- phone, two sides (like the design) ---------- */
@media (max-width: 700px) {
	.gmtl .gmtl-body { padding: 24px 10px 0; }
	.gmtl .gmtl-line { top: 24px; }
	.gmtl .gmtl-years { margin-top: 24px; width: calc(100% - 20px); }
	.gmtl .gmtl-sub { gap: 12px; font-size: 16px; }
	.gmtl .gmtl-sub::before, .gmtl .gmtl-sub::after { flex-basis: 34px; }
	.gmtl .gmtl-years a { font-size: 13px; padding: 4px 11px; }
	.gmtl .gmtl-list > .gmtl-year { margin: 34px 0 12px; }
	.gmtl .gmtl-year span { font-size: 20px; padding: 4px 11px; }
	.gmtl .gmtl-mark span { font-size: 12.5px; padding: 1px 11px; }
	.gmtl .gmtl-list > .gmtl-era { margin: 50px 0 20px; }
	.gmtl .gmtl-era h3 { font-size: 18px; padding: 10px 14px; max-width: 92%; }
	.gmtl .gmtl-list > .gmtl-ev { margin-bottom: 16px; }
	.gmtl .gmtl-card { width: calc(50% - 20px); padding: 12px; gap: 10px; border-radius: 12px; }
	.gmtl .gmtl-ev::after { display: none; }
	.gmtl .gmtl-node { top: 22px; width: 9px; height: 9px; margin-inline-start: -4.5px; }
	.gmtl .gmtl-ev-title { font-size: 15px; line-height: 1.4; }
	.gmtl .gmtl-date { font-size: 11.5px; margin-bottom: 4px; }
	.gmtl .gmtl-text { font-size: 13px; line-height: 1.7; }
	.gmtl .gmtl-img { border-radius: 5px; aspect-ratio: 4 / 3; }
	.gmtl .gmtl-px { transform: scale(.7); transform-origin: top; inset-inline-end: 8px; }
	.gmtl .gmtl-top { width: 42px; height: 42px; inset-inline-end: 12px; }
}

/* ---------- phone, one column (option in the settings) ---------- */
@media (max-width: 700px) {
	.gmtl--m-single .gmtl-line, .gmtl--m-single .gmtl-end::before { inset-inline-start: 22px; }
	.gmtl--m-single .gmtl-node { inset-inline-start: 22px; }
	.gmtl--m-single .gmtl-list > .gmtl-year, .gmtl--m-single .gmtl-list > .gmtl-mark { justify-content: flex-start; }
	.gmtl--m-single .gmtl-list > .gmtl-ev { justify-content: flex-start; }
	.gmtl--m-single .gmtl-card { width: calc(100% - 46px); margin-inline-start: 46px; flex-direction: row; align-items: flex-start; padding: 14px 16px; }
	.gmtl--m-single .gmtl-txt { width: auto; }
	.gmtl--m-single .gmtl-img { order: 0; flex: 0 0 34%; width: auto; aspect-ratio: 8 / 7; }
	.gmtl--m-single .gmtl-ev-title { font-size: 16px; }
	.gmtl--m-single .gmtl-text { font-size: 14px; }
}
@media (max-width: 420px) {
	.gmtl--m-single .gmtl-card { flex-direction: column; align-items: stretch; }
	.gmtl--m-single .gmtl-txt { width: 100%; }
	.gmtl--m-single .gmtl-img { order: -1; flex: none; width: 100%; aspect-ratio: 16 / 10; }
}

@media print {
	.gmtl .gmtl-years, .gmtl .gmtl-top, .gmtl .gmtl-deco { display: none; }
	.gmtl.is-js .gmtl-ev .gmtl-card { opacity: 1; transform: none; }
}
