/* The front page's Analysis band: the news under the knife (inc/analysis.php). */

.tt-an {
	--tt-an-ink: var(--tt-section-text, #fff);
	--tt-an-soft: rgba(255, 255, 255, .62);
	--tt-an-hair: rgba(255, 255, 255, .22);
	position: relative;
	margin-top: var(--tt-space-7);
	padding: var(--tt-space-7) 0 var(--tt-space-8);
	color: var(--tt-an-ink);
	background-color: var(--tt-section, #0400ff);
	/* the paper's squared grid, fading out to the right, over the colour's own gradient */
	background-image:
		linear-gradient(90deg, var(--tt-section-deep, #0300c7) 0%, transparent 70%),
		linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px),
		linear-gradient(100deg, var(--tt-section-deep, #0300c7) 0%, var(--tt-section, #0400ff) 45%, var(--tt-section-light, #1d1aff) 100%);
	background-size: auto, 32px 32px, 32px 32px, auto;
	--tt-text: var(--tt-an-ink);
	--tt-text-secondary: var(--tt-an-soft);
}

.tt-an a { color: inherit; text-decoration: none; }

/* head: the label, its line, the knife, More */
.tt-an__head { display: flex; align-items: center; gap: var(--tt-space-5); padding-bottom: var(--tt-space-5); border-bottom: 2px solid var(--tt-an-ink); margin-bottom: var(--tt-space-6); }
.tt-an__mast { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: var(--tt-space-5); row-gap: var(--tt-space-2); min-width: 0; }
.tt-an__label { display: inline-flex; }
.tt-an__line { margin: 0; font-family: var(--font-deck); font-size: 26px; line-height: 30px; color: var(--tt-an-soft); }
.tt-an__motif { flex: none; width: 74px; margin-inline-start: auto; opacity: .9; }
.tt-an__motif .sm-i { fill: var(--tt-an-ink); }
.tt-an__more { flex: none; color: var(--tt-an-ink); }

/* the grid: the lead and the rail */
.tt-an__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--tt-space-7); align-items: start; }

/* the lead */
.tt-an__lead { display: grid; gap: var(--tt-space-5); min-width: 0; }
.tt-an__pic { position: relative; display: block; overflow: hidden; background: var(--tt-section-deep, #0300c7); }
.tt-an__pic .tt-picture { margin: 0; }
.tt-an__pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .6s cubic-bezier(.2, 0, 0, 1); }
.tt-an__lead:hover .tt-an__pic img { scale: 1.03; }
.tt-an__blade { position: absolute; inset-block: 0; inset-inline-start: 50%; width: 3px; margin-inline-start: -1.5px; background: var(--tt-an-ink); opacity: 0; pointer-events: none; transform-origin: 50% 0; }

.tt-an__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tt-space-3); margin: 0; font-family: var(--font-ui); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tt-an-soft); }
.tt-an__meta > span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-inline-end: var(--tt-space-3); vertical-align: middle; background: currentColor; }
.tt-an__n { color: var(--tt-an-ink); font-family: var(--font-display); font-weight: 900; letter-spacing: 0; font-size: 14px; }

.tt-an__headline { margin: var(--tt-space-3) 0 0; font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 3.1vw, 46px); line-height: 1.04; letter-spacing: -.02em; }
.tt-an__deck { margin: var(--tt-space-4) 0 0; font-family: var(--font-deck); font-size: 22px; line-height: 28px; color: var(--tt-an-soft); max-width: 34em; }

.tt-an__quote { margin: var(--tt-space-5) 0 0; padding: var(--tt-space-4) 0 0 var(--tt-space-5); border-inline-start: 4px solid var(--tt-an-ink); }
.tt-an__quote p { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 27px; letter-spacing: -.01em; max-width: 30em; }

/* the rail */
.tt-an__rail { list-style: none; margin: 0; padding: 0; display: grid; }
.tt-an__item { display: grid; grid-template-columns: auto minmax(0, 1fr) 128px; gap: var(--tt-space-4); align-items: start; padding: var(--tt-space-5) 0; border-top: 1px solid var(--tt-an-hair); }
.tt-an__item:first-child { padding-top: 0; border-top: 0; }
.tt-an__big { font-family: var(--font-display); font-weight: 900; font-size: 44px; line-height: .9; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px var(--tt-an-ink); min-width: 1.4em; font-variant-numeric: tabular-nums; }
.tt-an__title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 23px; letter-spacing: -.005em; }
.tt-an__sub { margin: var(--tt-space-2) 0 0; font-family: var(--font-deck); font-size: 17px; line-height: 22px; color: var(--tt-an-soft); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.tt-an__thumb { display: block; overflow: hidden; background: var(--tt-section-deep, #0300c7); }
.tt-an__thumb .tt-picture { margin: 0; }
.tt-an__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .5s cubic-bezier(.2, 0, 0, 1); }
.tt-an__item:hover .tt-an__thumb img { scale: 1.05; }
.tt-an__item:hover .tt-an__big { color: var(--tt-an-ink); }

/* how long it takes to read, as a bar */
.tt-an__meter { display: flex; align-items: center; gap: var(--tt-space-3); margin: var(--tt-space-3) 0 0; }
.tt-an__track { position: relative; flex: 0 1 120px; height: 4px; background: var(--tt-an-hair); }
.tt-an__fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: calc(var(--tt-an-w, .5) * 100%); background: var(--tt-an-ink); transform-origin: 0 50%; }
[dir="rtl"] .tt-an__fill { transform-origin: 100% 50%; }
.tt-an__mins { font-family: var(--font-ui); font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tt-an-soft); white-space: nowrap; }

/* links, on the blue */
.tt-an .tt-story__link { background-image: linear-gradient(var(--tt-an-ink), var(--tt-an-ink)); }
.tt-an .tt-story__link:hover, .tt-an .tt-story__link:focus-visible { color: var(--tt-section, #0400ff); }

/* the cut, once, as the band comes into view: the blade comes down, the picture opens from it, the bars run */
.tt-an--armed .tt-an__pic .tt-picture { clip-path: inset(0 50% 0 50%); }
.tt-an--armed .tt-an__fill { scale: 0 1; }
.tt-an--armed.is-in .tt-an__blade { animation: tt-an-blade .9s cubic-bezier(.7, 0, .2, 1) both; }
.tt-an--armed.is-in .tt-an__pic .tt-picture { clip-path: inset(0 0 0 0); transition: clip-path .55s cubic-bezier(.7, 0, .2, 1) .32s; }
.tt-an--armed.is-in .tt-an__fill { scale: 1 1; transition: scale .5s cubic-bezier(.7, 0, .2, 1); }
.tt-an--armed.is-in .tt-an__item:nth-child(1) .tt-an__fill { transition-delay: .55s; }
.tt-an--armed.is-in .tt-an__item:nth-child(2) .tt-an__fill { transition-delay: .65s; }
.tt-an--armed.is-in .tt-an__item:nth-child(3) .tt-an__fill { transition-delay: .75s; }
@keyframes tt-an-blade { 0% { opacity: 1; scale: 1 0; } 35% { opacity: 1; scale: 1 1; } 70% { opacity: 1; scale: 1 1; } 100% { opacity: 0; scale: 1 1; } }

/* Urdu */
[lang="ur"] .tt-an__sub { font-size: 15px; line-height: 28px; }
[lang="ur"] :is(.tt-an__headline, .tt-an__title, .tt-an__quote p, .tt-an__deck, .tt-an__sub, .tt-an__line, .tt-an__meta, .tt-an__mins) { font-family: var(--font-urdu); letter-spacing: 0; text-transform: none; }
[lang="ur"] .tt-an__headline { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.6; font-weight: 700; }
[lang="ur"] .tt-an__title { font-size: 17px; line-height: 30px; font-weight: 700; }
[lang="ur"] .tt-an__deck { font-size: 17px; line-height: 32px; }
[lang="ur"] .tt-an__quote p { font-size: 18px; line-height: 34px; font-weight: 700; }
[lang="ur"] .tt-an__line { font-size: 18px; line-height: 30px; }
[lang="ur"] :is(.tt-an__meta, .tt-an__mins) { font-size: 13px; }

/* tablet and phone: the lead across, the rail under it */
@media (max-width: 1023px) {
	.tt-an__grid { grid-template-columns: minmax(0, 1fr); gap: var(--tt-space-6); }
	.tt-an__rail { padding-top: var(--tt-space-5); border-top: 2px solid var(--tt-an-ink); }
}
@media (max-width: 767px) {
	.tt-an { padding: var(--tt-space-6) 0 var(--tt-space-7); background-size: auto, 24px 24px, 24px 24px, auto; }
	.tt-an__head { flex-wrap: wrap; align-items: flex-start; gap: var(--tt-space-3); padding-bottom: var(--tt-space-4); margin-bottom: var(--tt-space-5); }
	.tt-an__mast { flex-direction: column; align-items: flex-start; flex: 1 1 0; }
	.tt-an__line { font-size: 20px; line-height: 24px; }
	.tt-an__motif { display: none; }
	.tt-an__more { margin-inline-start: auto; margin-top: -10px; }
	.tt-an__headline { font-size: 29px; line-height: 1.06; }
	.tt-an__deck { font-size: 19px; line-height: 25px; }
	.tt-an__quote p { font-size: 18px; line-height: 24px; }
	.tt-an__item { grid-template-columns: auto minmax(0, 1fr) 96px; gap: var(--tt-space-3); }
	.tt-an__big { font-size: 32px; }
	.tt-an__title { font-size: 17px; line-height: 21px; }
	.tt-an__sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.tt-an--armed .tt-an__pic .tt-picture { clip-path: none; }
	.tt-an--armed .tt-an__fill { scale: 1 1; }
	.tt-an__blade { display: none; }
	.tt-an__pic img, .tt-an__thumb img { transition: none; }
}
