/* ==========================================================================
   Chaince Securities — Press Releases

   Self-contained. Does not depend on, and is not depended on by, the
   custom-css-js snippets or the B2i widget styles. All tunables are custom
   properties on .cs-press. Two layouts share the row markup:

     .cs-press--home  navy panel on the homepage (lead item + short list)
     .cs-press--list  full index on the cream Press Releases page

   Selectors are class-only and reasonably specific so Divi's element rules
   (h3, ul, a) do not leak in.
   ========================================================================== */

.cs-press {
	--cs-press-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--cs-press-sans: "DM Sans", "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

	/* home panel — matches the tombstone / footer navy and the site's cream text */
	--cs-press-panel: #111727;
	--cs-press-ink: #E3DDCD;        /* 13.6:1 on the panel */
	--cs-press-accent: #b29c60;     /* 6.6:1 on the panel — dates, flags, links */
	--cs-press-rule: rgba(227, 221, 205, .18);

	font-family: var(--cs-press-sans);
	box-sizing: border-box;
}

.cs-press *,
.cs-press *::before,
.cs-press *::after { box-sizing: inherit; }

/* --- shared list rows ---------------------------------------------------- */

.cs-press__list {
	list-style: none;
	margin: 0;
	padding: 0;
	line-height: 1.4;
}

.cs-press__row {
	display: flex;
	gap: 1.25rem;
	align-items: baseline;
	margin: 0;
	padding: .95rem 0;
	border-bottom: 1px solid var(--cs-press-rule);
}

/* display:flex above would otherwise beat [hidden]'s display:none */
.cs-press__row[hidden] { display: none !important; }

.cs-press__date {
	flex: 0 0 7.5rem;
	font-size: .75rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--cs-press-accent);
	white-space: nowrap;
}

.cs-press__headline {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
	font-size: 1rem;
	overflow-wrap: anywhere;
}

.cs-press__row-link,
.cs-press__row-link:visited {
	color: var(--cs-press-ink);
	text-decoration: none;
}

.cs-press__row-link:hover,
.cs-press__row-link:focus-visible {
	color: var(--cs-press-accent);
	text-decoration: underline;
	text-underline-offset: .15em;
}

/* --- draft badge (staff preview only) ----------------------------------- */

.cs-press__badge {
	display: inline-block;
	margin-left: .5rem;
	padding: .1rem .45rem;
	border-radius: 3px;
	background: #b32d2e;
	color: #ffffff;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	vertical-align: middle;
}

/* --- homepage panel ------------------------------------------------------ */

.cs-press--home {
	background: var(--cs-press-panel);
	color: var(--cs-press-ink);
	border-radius: 10px;
	padding: clamp(1.25rem, 3vw, 2.25rem);
}

.cs-press__hero {
	display: flex;
	gap: clamp(1rem, 3vw, 2.5rem);
	align-items: center;
}

.cs-press__hero-media {
	flex: 0 0 38%;
	max-width: 38%;
}

.cs-press__hero-media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.cs-press__hero-body {
	flex: 1 1 auto;
	min-width: 0;
}

.cs-press__meta {
	margin: 0 0 .75rem;
	padding: 0;
	font-size: .75rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--cs-press-accent);
}

.cs-press__sep { margin: 0 .5em; }

/*
 * The site's custom CSS paints every p / h3 inside a .general-content-white
 * section dark (#161d31) with (0,3,1) specificity, which is exactly the
 * section the homepage panel sits in. These two rules outrank it at (0,4,1)
 * so the lead item stays legible on the navy panel. Keep them if the panel
 * ever moves; they are harmless elsewhere.
 */
.cs-press.cs-press--home .cs-press__hero p.cs-press__meta,
.cs-press.cs-press--home .cs-press__hero p.cs-press__meta time {
	color: var(--cs-press-accent);
}

.cs-press.cs-press--home .cs-press__hero h3.cs-press__title,
.cs-press.cs-press--home .cs-press__hero h3.cs-press__title a,
.cs-press.cs-press--home .cs-press__hero h3.cs-press__title a:visited {
	color: var(--cs-press-ink);
}

.cs-press--home .cs-press__title {
	margin: 0 0 1rem;
	padding: 0;
	font-family: var(--cs-press-serif);
	font-weight: 400;
	font-size: clamp(1.3rem, 2.2vw, 1.85rem);
	line-height: 1.25;
	color: var(--cs-press-ink);
	/* three lines, then an ellipsis; the full headline is on the link target */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.cs-press--home .cs-press__title a,
.cs-press--home .cs-press__title a:visited {
	color: inherit;
	text-decoration: none;
}

.cs-press--home .cs-press__title a:hover,
.cs-press--home .cs-press__title a:focus-visible {
	text-decoration: underline;
	text-underline-offset: .12em;
}

.cs-press__more,
.cs-press__more:visited {
	display: inline-block;
	color: var(--cs-press-accent);
	font-weight: 600;
	font-size: .95rem;
	text-decoration: none;
}

.cs-press__more:hover,
.cs-press__more:focus-visible {
	text-decoration: underline;
	text-underline-offset: .15em;
}

.cs-press--home .cs-press__list {
	margin-top: 1.5rem;
	border-top: 1px solid var(--cs-press-rule);
}

.cs-press--home .cs-press__row:last-child { border-bottom: 0; padding-bottom: .25rem; }

/* one line each in the short list; the full headline is on the link target */
.cs-press--home .cs-press__headline {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

/* --- full index page ----------------------------------------------------- */

.cs-press--list {
	/* dark ink on the page's cream section */
	--cs-press-ink: #161d31;
	--cs-press-accent: #7B6D4B;     /* 5.4:1 on #ebe7dc */
	--cs-press-rule: #D9D5CB;
	color: var(--cs-press-ink);
}

.cs-press--list .cs-press__row { padding: 1.2rem 0; }
.cs-press--list .cs-press__headline { font-size: 1.15rem; }
.cs-press--list .cs-press__row-link:hover,
.cs-press--list .cs-press__row-link:focus-visible { color: var(--cs-press-ink); }

.cs-press__tools {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem 1.25rem;
	align-items: flex-end;
	margin: 0 0 1.75rem;
}

.cs-press__tools[hidden] { display: none !important; }

.cs-press__tool {
	margin: 0;
	padding: 0;
	flex: 0 0 auto;
}

.cs-press__tool--grow {
	flex: 1 1 16rem;
	max-width: 28rem;
}

.cs-press__label {
	display: block;
	margin-bottom: .3rem;
	font-size: .75rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--cs-press-accent);
}

.cs-press__select,
.cs-press__search {
	width: 100%;
	min-height: 2.75rem;
	padding: .4rem .75rem;
	border: 1px solid #b9b3a5;
	border-radius: 6px;
	background: #ffffff;
	color: var(--cs-press-ink);
	font: inherit;
	font-size: .95rem;
}

.cs-press__select { min-width: 9rem; }

.cs-press__empty {
	margin: 1rem 0 0;
	color: var(--cs-press-accent);
}

/* --- focus, motion, forced colours -------------------------------------- */

.cs-press a:focus-visible,
.cs-press__select:focus-visible,
.cs-press__search:focus-visible {
	outline: 2px solid var(--cs-press-accent);
	outline-offset: 3px;
}

@media (forced-colors: active) {
	.cs-press--home { border: 1px solid CanvasText; }
	.cs-press a { text-decoration: underline; }
}

/* --- narrow screens ------------------------------------------------------ */

@media (max-width: 700px) {
	.cs-press__hero {
		flex-direction: column;
		align-items: stretch;
	}
	.cs-press__hero-media {
		flex-basis: auto;
		max-width: 100%;
	}
	.cs-press__row {
		flex-direction: column;
		gap: .3rem;
	}
	.cs-press__date { flex-basis: auto; }
}
