/* =============================================================
   CRC Cases Database — archive styles
   Palette: #0C1B4F (navy ink)  #FECA03 (signal yellow)
   Typeface: Arial
   ============================================================= */

:root {
	--crc-ink:        #0C1B4F;
	--crc-ink-2:      #2A376B;
	--crc-mark:       #FECA03;
	--crc-mark-soft:  #FFF2B8;
	--crc-page:       #FAFAF7;
	--crc-card:       #FFFFFF;
	--crc-rule:       #E6E6E0;
	--crc-rule-2:     #F0F0EC;
	--crc-muted:      #6B6B6B;
	--crc-muted-2:    #8F8F8F;

	--crc-radius:     2px;
	--crc-shell-max:  1280px;
	--crc-gutter:     40px;
}

/* Scope everything under .crc to avoid bleeding into the theme. */
.crc,
.crc * {
	box-sizing: border-box;
	font-family: Arial, Helvetica, sans-serif;
}

/* Reset button styles that themes commonly inject.
   Only target filter-panel buttons so the search submit button keeps its yellow bg. */
.crc-filters button {
	border: none !important;
	outline: none !important;
	background: transparent !important;
	background-color: transparent !important;
	color: inherit !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}

/* Re-apply facet head layout overriding any theme padding/font/flex resets. */
.crc .crc-facet-head {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100% !important;
	padding: 16px 0 !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	color: var(--crc-ink) !important;
}


.crc {
	background: var(--crc-page);
	color: var(--crc-ink);
	padding-bottom: 80px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.crc a { text-decoration: none; }
.crc a:not([class]) { color: inherit; }
.crc h1, .crc h2, .crc h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }

.crc-shell {
	max-width: var(--crc-shell-max);
	margin: 0 auto;
	padding: 0 var(--crc-gutter);
}

/* ---------- MASTHEAD ---------- */
.crc-masthead {
	background: var(--crc-ink);
	color: #fff;
	padding: 20px 0 40px;
	position: relative;
	overflow: hidden;
}
.crc-masthead::before {
	content: "";
	position: absolute;
	inset: 0 0 0 0;
	pointer-events: none;
	background:
		linear-gradient(90deg, transparent 0, transparent calc(100% - 6px), var(--crc-mark) calc(100% - 6px), var(--crc-mark) 100%);
	opacity: 0;
}
.crc-crumbs {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
	margin-bottom: 28px;
}
.crc-crumbs a { color: rgba(255, 255, 255, 0.75); }
.crc-crumbs a:hover { color: var(--crc-mark); }
.crc-crumbs span { margin: 0 8px; color: rgba(255, 255, 255, 0.35); }
.crc-crumbs-current { color: #fff !important; }

.crc-masthead-row {
	display: grid;
	grid-template-columns: 1fr minmax(280px, 440px);
	gap: 40px;
	align-items: end;
}
.crc-masthead-title { min-width: 0; }

.crc-eyebrow {
	display: inline-block;
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--crc-mark);
	padding-bottom: 8px;
	position: relative;
}
.crc-eyebrow::after {
	content: "";
	display: inline-block;
	width: 28px;
	height: 2px;
	background: var(--crc-mark);
	vertical-align: middle;
	margin-left: 10px;
}

.crc-masthead h1 {
	font-size: clamp(34px, 4.2vw, 56px);
	line-height: 1.04;
	margin-top: 12px;
	letter-spacing: -0.02em;
}
.crc-masthead-desc {
	margin: 14px 0 0;
	max-width: 56ch;
	color: rgba(255, 255, 255, 0.75);
	font-size: 14px;
	line-height: 1.6;
}
.crc-masthead-q {
	color: var(--crc-mark);
	font-weight: 700;
	background: rgba(254, 202, 3, 0.12);
	padding: 1px 6px;
	border-radius: var(--crc-radius);
}

/* Search */
.crc-search {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: stretch;
	background: #fff;
	border-radius: var(--crc-radius);
	overflow: hidden;
}
.crc-search input[type="text"] {
	border: 0;
	padding: 14px 16px;
	font-size: 14px;
	color: var(--crc-ink);
	outline: none;
	background: transparent;
}
.crc-search input::placeholder { color: var(--crc-muted-2); }
.crc-search button {
	border: 0 !important;
	background: var(--crc-mark) !important;
	background-color: var(--crc-mark) !important;
	color: var(--crc-ink) !important;
	font-weight: 700 !important;
	font-size: 13px !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase !important;
	padding: 0 22px !important;
	cursor: pointer !important;
	transition: background 120ms ease !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}
.crc-search button:hover { background: #ffd833 !important; background-color: #ffd833 !important; }

/* ---------- META STRIP ---------- */
.crc-metastrip {
	background: #fff;
	border-bottom: 1px solid var(--crc-rule);
}
.crc-metastrip-row {
	display: flex;
	gap: 20px;
	align-items: center;
	padding-top: 14px;
	padding-bottom: 14px;
	flex-wrap: wrap;
}
.crc-results-count {
	font-size: 13px;
	color: var(--crc-muted);
}
.crc-results-count strong {
	color: var(--crc-ink);
	font-weight: 700;
}

.crc-chips {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	flex: 1;
}
.crc-chips-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--crc-muted);
}
.crc-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 10px;
	border: 1px solid var(--crc-ink);
	background: var(--crc-ink);
	color: #fff;
	font-size: 12px;
	line-height: 1;
	border-radius: var(--crc-radius);
	transition: background 120ms ease;
}
.crc-chip:hover { background: var(--crc-mark); color: var(--crc-ink); border-color: var(--crc-mark); }
.crc-chip-x { font-size: 14px; opacity: 0.8; }

.crc-metastrip-spacer { flex: 1; }

.crc-sort {
	margin-left: auto;
	display: flex;
	gap: 10px;
	align-items: center;
}
.crc-sort label {
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--crc-muted);
}
.crc-sort select {
	border: 1px solid var(--crc-rule);
	background: #fff;
	color: var(--crc-ink);
	padding: 7px 10px;
	font-size: 13px;
	font-family: inherit;
	border-radius: var(--crc-radius);
	cursor: pointer;
}
.crc-sort select:focus { outline: 2px solid var(--crc-mark); outline-offset: 1px; }

/* ---------- BODY GRID ---------- */
.crc-body {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 40px;
	padding-top: 32px;
}

/* ---------- FILTERS ---------- */
.crc-filters {
	position: sticky;
	top: 24px;
	align-self: start;
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding-right: 4px;
}

.crc-filter-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--crc-ink);
	margin-bottom: 6px;
}
.crc-filter-head h2 {
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.crc-clear {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--crc-muted);
	border-bottom: 1px solid currentColor;
}
.crc-clear:hover { color: var(--crc-ink); }

.crc-facet {
	border-bottom: 1px solid var(--crc-rule);
	padding: 4px 0;
}
.crc-facet-head {
	width: 100%;
	text-align: left;
	background: transparent;
	border: 0;
	padding: 16px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--crc-ink);
	cursor: pointer;
	font-family: inherit;
}
/* Hide the toggle span — chevron is rendered via ::after on the button instead. */
.crc .crc-facet-toggle {
	display: none !important;
}

/* Chevron on the button itself — immune to theme span overrides. */
.crc .crc-facet-head::after {
	content: "" !important;
	display: block !important;
	flex-shrink: 0 !important;
	width: 14px !important;
	height: 9px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpolyline points='1,1 6,7 11,1' fill='none' stroke='%230C1B4F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-size: contain !important;
	transition: transform 150ms ease;
}
.crc-facet[data-collapsed="true"] .crc-facet-head::after {
	transform: rotate(180deg);
}

/* Suppress vertical bar pseudo-elements the theme injects inside buttons. */
.crc .crc-facet-head::before,
.crc .crc-facet-head > span::before,
.crc .crc-facet-head > span:first-child::after {
	content: none !important;
	display: none !important;
}
.crc-facet[data-collapsed="true"] .crc-facet-body {
	display: none;
}
.crc-facet-body { padding: 2px 0 18px; }

.crc-facet-search {
	margin-bottom: 10px;
}
.crc-facet-search input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--crc-rule);
	background: #fff;
	font-family: inherit;
	font-size: 12px;
	color: var(--crc-ink);
	border-radius: var(--crc-radius);
}
.crc-facet-search input:focus { outline: 2px solid var(--crc-mark); outline-offset: 0; border-color: var(--crc-mark); }

.crc-facet-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.crc-facet-list--scroll {
	max-height: 240px;
	overflow-y: auto;
	padding-right: 4px;
}
.crc-facet-list li + li { margin-top: 2px; }

.crc-check {
	display: grid;
	grid-template-columns: 16px 1fr auto;
	gap: 10px;
	align-items: center;
	padding: 6px 4px;
	font-size: 13px;
	line-height: 1.35;
	color: var(--crc-ink);
	border-radius: var(--crc-radius);
	transition: background 100ms ease;
}
.crc-check:hover { background: #fffbe6; }
.crc-check-box {
	width: 14px;
	height: 14px;
	border: 1.5px solid var(--crc-ink);
	background: #fff;
	position: relative;
}
.crc-check.is-active .crc-check-box {
	background: var(--crc-ink);
	border-color: var(--crc-ink);
}
.crc-check.is-active .crc-check-box::after {
	content: "";
	position: absolute;
	left: 3px; top: 0px;
	width: 4px; height: 8px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg);
}
.crc-check-label { min-width: 0; word-break: break-word; }
.crc-check.is-active .crc-check-label { font-weight: 700; }
.crc-check-count {
	font-size: 11px;
	color: var(--crc-muted);
	font-variant-numeric: tabular-nums;
}

.crc-facet-empty {
	font-size: 12px;
	color: var(--crc-muted);
	margin: 0 0 10px;
}

/* ---------- RESULTS / CASES ---------- */
.crc-results { min-width: 0; }

.crc-case-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	counter-reset: crc-case;
}

.crc-case {
	position: relative;
	background: var(--crc-card);
	border: 1px solid var(--crc-rule);
	border-radius: var(--crc-radius);
	padding: 18px 24px 16px 28px;
	transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.crc-case:hover {
	border-color: var(--crc-ink);
	box-shadow: 0 2px 0 0 var(--crc-ink);
	transform: translateY(-1px);
}
.crc-case-marker {
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 4px;
	background: var(--crc-ink);
	transition: background 160ms ease, width 160ms ease;
}
.crc-case:hover .crc-case-marker {
	background: var(--crc-mark);
	width: 6px;
}

.crc-case-body { min-width: 0; }

.crc-case-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 6px;
}
.crc-meta-court {
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--crc-muted);
}
.crc-meta-sep {
	width: 3px; height: 3px;
	background: var(--crc-mark);
	border-radius: 50%;
}
.crc-meta-citation {
	font-size: 11px;
	font-family: "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
	color: var(--crc-muted);
	background: #F5F4EE;
	padding: 3px 8px;
	border-radius: var(--crc-radius);
	letter-spacing: 0.02em;
}

.crc-case-title {
	font-size: 20px;
	line-height: 1.3;
	margin: 0 0 10px;
	letter-spacing: -0.005em;
	color: var(--crc-ink);
}
.crc-case-title a { transition: color 120ms ease; }
.crc-case-title a:hover { color: var(--crc-ink-2); background: linear-gradient(transparent 60%, var(--crc-mark-soft) 60%); }

.crc-case-section {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 14px;
	padding: 6px 0;
	border-top: 1px dashed var(--crc-rule);
}
.crc-case-label {
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--crc-muted);
	font-weight: 700;
	padding-top: 3px;
}
.crc-case-ratio {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--crc-ink);
	text-wrap: pretty;
}
.crc-case-pincites {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--crc-muted);
	font-family: "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
}

.crc-case-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--crc-rule);
}
.crc-case-tags {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.crc-case-tags a {
	display: inline-block;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--crc-muted);
	border: 1px solid var(--crc-rule);
	padding: 4px 8px;
	border-radius: var(--crc-radius);
	transition: all 120ms ease;
}
.crc-case-tags a:hover { color: var(--crc-ink); border-color: var(--crc-ink); }

.crc-read-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--crc-ink);
	padding: 10px 16px;
	border: 1.5px solid var(--crc-ink);
	border-radius: var(--crc-radius);
	transition: all 140ms ease;
	position: relative;
}
.crc-read-more:hover {
	background: var(--crc-ink);
	color: var(--crc-mark);
}
.crc-read-more .crc-arrow {
	transition: transform 160ms ease;
}
.crc-read-more:hover .crc-arrow { transform: translateX(3px); }

/* ---------- EMPTY STATE ---------- */
.crc-empty {
	background: #fff;
	border: 1px solid var(--crc-rule);
	padding: 80px 40px;
	text-align: center;
	border-radius: var(--crc-radius);
}
.crc-empty-mark {
	width: 48px; height: 48px;
	margin: 0 auto 20px;
	background:
		linear-gradient(var(--crc-ink), var(--crc-ink)) 0 50%/100% 2px no-repeat,
		linear-gradient(var(--crc-mark), var(--crc-mark)) 50% 0/2px 100% no-repeat;
	background-color: transparent;
}
.crc-empty h2 {
	font-size: 22px;
	margin-bottom: 8px;
}
.crc-empty p {
	color: var(--crc-muted);
	margin: 0 0 20px;
	font-size: 14px;
}
.crc-btn {
	display: inline-block;
	background: var(--crc-ink);
	color: #fff;
	padding: 12px 22px;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	border-radius: var(--crc-radius);
	transition: background 140ms ease, color 140ms ease;
}
.crc-btn:hover { background: var(--crc-mark); color: var(--crc-ink); }

/* ---------- PAGINATION ---------- */
.crc-pagination {
	display: flex;
	gap: 6px;
	justify-content: center;
	margin-top: 32px;
	flex-wrap: wrap;
}
.crc-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--crc-rule);
	font-size: 13px;
	color: var(--crc-ink);
	border-radius: var(--crc-radius);
	transition: all 120ms ease;
}
.crc-pagination .page-numbers:hover {
	border-color: var(--crc-ink);
}
.crc-pagination .page-numbers.current {
	background: var(--crc-ink);
	color: var(--crc-mark);
	border-color: var(--crc-ink);
	font-weight: 700;
}
.crc-pagination .page-numbers.dots {
	border: 0;
	color: var(--crc-muted);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
	.crc-body { grid-template-columns: 1fr; gap: 24px; }
	.crc-filters { position: static; max-height: none; }
	.crc-masthead-row { grid-template-columns: 1fr; gap: 24px; }
	.crc-case { padding: 16px 18px 14px 22px; }
}
@media (max-width: 560px) {
	:root { --crc-gutter: 24px; }
	.crc-masthead { padding: 16px 0 28px; }
	.crc-case-section { grid-template-columns: 1fr; gap: 4px; }
	.crc-case-foot { flex-direction: column; align-items: flex-start; }
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}

/* ---------- SEARCH HIGHLIGHT ---------- */
mark.crc-highlight,
.crc mark.crc-highlight,
.crc-results mark.crc-highlight,
.crc-case mark.crc-highlight {
	background: #FECA03 !important;
	background-color: #FECA03 !important;
	color: #0C1B4F !important;
	padding: 1px 4px !important;
	border-radius: 2px !important;
	font-style: inherit !important;
	font-weight: inherit !important;
	display: inline !important;
	box-shadow: 0 0 0 1px rgba(254, 202, 3, 0.4) !important;
}
