/* Section pages (Art, Architecture, Design …) — design C: lead story + waterfall.
   Page colours come from the theme; text on pictures is always white on a dark fade. */
.ss {
	--ss-max: none;            /* set in Abir Pothi → Section pages → Page width */
	--ss-pad: clamp(18px, 3.4vw, 64px);  /* matches ART's header side margins on desktop */
	--ss-gap: 20px;
	--ss-muted: color-mix(in srgb, currentColor 62%, transparent);
	--ss-line: color-mix(in srgb, currentColor 16%, transparent);
	--ss-tint: color-mix(in srgb, currentColor 5%, transparent);
	--ss-ease: cubic-bezier(.16, 1, .3, 1);
	display: block; max-width: var(--ss-max); margin: 0 auto; font-family: var(--ap-font-body, inherit);
	padding: clamp(40px, 6vw, 72px) var(--ss-pad) 0; box-sizing: border-box; color: var(--ap-text, inherit); background: var(--ap-bg, transparent);
}
.ss *, .ss *::before, .ss *::after { box-sizing: border-box; }

/* ── Section heading ─────────────────────────── */
.ss-eyebrow { display: block; font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ss-muted); }
.ss .ss-h1 {
	margin: 10px 0 0; font-weight: 500;
	font-size: clamp(56px, 8vw, 112px); line-height: .95; letter-spacing: -0.02em; color: inherit; text-transform: none;
}
.ss-pageno { font-size: .32em; font-weight: 600; letter-spacing: 0; color: var(--ss-muted); vertical-align: middle; }
.ss-intro { margin-top: 20px; max-width: 60ch; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; color: var(--ss-muted); }
.ss-intro > * { margin: 0 0 .8em; }
.ss-intro > *:last-child { margin-bottom: 0; }

.ss-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ss .ss-pill {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px;
	border: 1px solid var(--ss-line); border-radius: var(--ap-radius, 999px); font-size: 14px; color: inherit; text-decoration: none;
}
.ss .ss-pill:hover { background: var(--ss-tint); }
.ss .ss-pill.is-active { border-color: var(--ap-accent, currentColor); color: var(--ap-accent, inherit); font-weight: 700; box-shadow: inset 0 0 0 1px var(--ap-accent, currentColor); }
.ss-setup { margin-top: 24px; padding: 12px 16px; border: 1px dashed currentColor; font-size: 14px; }

/* ── Cards (shared) ──────────────────────────── */
.ss-card { position: relative; margin: 0; }
.ss .ss-link { display: block; position: relative; overflow: hidden; color: #ffffff; text-decoration: none; background: #e6e6e6; }
.ss .ss-img {
	display: block !important; width: 100% !important; height: auto !important; max-width: none !important; margin: 0 !important;
	transition: transform .8s var(--ss-ease);
}
.ss .ss-link:hover .ss-img { transform: scale(1.035); }
.ss-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.84) 0%, rgba(0,0,0,.42) 40%, rgba(0,0,0,0) 68%); pointer-events: none; }
.ss-cap { position: absolute; left: 16px; right: 16px; bottom: 14px; display: grid; gap: 4px; }
.ss-kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .88; }
.ss .ss-title {
	margin: 0; font-weight: 600; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.18;
	color: #ffffff; text-wrap: balance; text-transform: none; letter-spacing: 0;
}
.ss .ss-link:hover .ss-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.ss-date { font-size: 12px; opacity: .8; }
.ss-card:not(.ss-lead) .ss-date { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ss .ss-link:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

/* Stories without a picture: text card */
.ss .ss-noimg .ss-link { background: var(--ss-tint); color: inherit; border: 1px solid var(--ss-line); }
.ss-noimg .ss-cap { position: static; padding: 22px 20px 20px; }
.ss .ss-noimg .ss-title { color: inherit; font-size: clamp(22px, 1.9vw, 26px); }

/* ── Lead story ──────────────────────────────── */
.ss-lead { margin-top: 40px; }
.ss .ss-lead .ss-link { height: clamp(380px, 46vw, 600px); }
.ss .ss-lead .ss-img { height: 100% !important; object-fit: cover; }
.ss-lead .ss-shade { background: linear-gradient(to top, rgba(0,0,0,.86) 0%, rgba(0,0,0,.36) 46%, rgba(0,0,0,0) 72%); }
.ss-lead .ss-cap { left: clamp(20px, 3vw, 40px); right: clamp(20px, 3vw, 40px); bottom: clamp(20px, 3vw, 36px); gap: 10px; max-width: 900px; }
.ss-lead .ss-kicker { font-size: 12px; letter-spacing: .18em; }
.ss .ss-lead .ss-title { font-weight: 600; font-size: clamp(30px, 3.8vw, 52px); line-height: 1.06; letter-spacing: -0.01em; }
.ss-lead .ss-date { font-size: 14px; }
.ss .ss-lead.ss-noimg .ss-link { height: auto; }

/* ── Waterfall ───────────────────────────────── */
.ss-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: var(--ss-gap); margin-top: var(--ss-gap); align-items: start;
}
/* With JS: masonry via row spans (keeps reading order left-to-right) */
.ss-grid.is-masonry { grid-auto-rows: 4px; row-gap: 0; }
.ss-grid.is-masonry .ss-item { padding-bottom: var(--ss-gap); }
.ss-item.is-new { animation: ss-in .5s var(--ss-ease) both; }
@keyframes ss-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── More stories ────────────────────────────── */
.ss-more { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 48px 0 96px; }
.ss .ss-loadmore {
	all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 0 28px; border: 1px solid currentColor; border-radius: var(--ap-radius, 999px); cursor: pointer;
	font-family: inherit; font-weight: 500; font-size: 16px; color: inherit;
}
.ss .ss-loadmore:hover { background: var(--ss-tint); }
.ss .ss-loadmore:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.ss .ss-loadmore[aria-busy="true"] { opacity: .6; cursor: progress; }
.ss-loadmore[hidden] { display: none !important; }
.ss-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px; font-size: 14px; }
.ss .ss-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; color: var(--ss-muted); text-decoration: none; }
.ss .ss-pager a.page-numbers:hover { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ss .ss-pager .current { color: inherit; font-weight: 700; }
.ss-status { margin: 0; min-height: 1em; font-size: 14px; color: var(--ss-muted); }
.ss-empty { padding: 64px 0; text-align: center; color: var(--ss-muted); }

@media (max-width: 640px) {
	.ss .ss-lead .ss-link { height: 70vh; min-height: 360px; }
	.ss-lead { margin-left: calc(-1 * var(--ss-pad)); margin-right: calc(-1 * var(--ss-pad)); }
}
@media (prefers-reduced-motion: reduce) {
	.ss .ss-img { transition: none; }
	.ss-item.is-new { animation: none; }
}

/* Search results page */
.ss-searchform { display: flex; gap: 10px; margin-top: 14px; max-width: 720px; }
.ss .ss-searchinput { all: unset; box-sizing: border-box; flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border: 1px solid var(--ss-line); border-radius: var(--ap-radius, 999px); font-size: 17px; color: inherit; background: var(--ss-tint); }
.ss .ss-searchinput:focus-visible { outline: 2px solid var(--ap-accent, currentColor); outline-offset: 2px; }
.ss .ss-searchbtn { border-radius: var(--ap-radius, 999px); }

/* Category / tag archives */
.ss .ss-count { margin: 10px 0 0; font-size: 14px; font-weight: 500; color: var(--ss-muted); }
