/* Krishgen — Product Citations page (page-product-citations.php)
   "Journal index" look: serif headings and reference text, sans controls, brand red accents.
   Light surfaces only. No pink, no dark sections. */

/* ---------- Page stability + full width ---------- */
/* Reserve the scrollbar space so the page never shifts sideways when the list gets shorter or longer. */
html:has(body.kg-citations-page) { scrollbar-gutter: stable; }

body.kg-citations-page #secondary,
body.kg-citations-page .widget-area { display: none !important; }

/* Every wrapper the theme puts around our block is let go of its width limits, so the block can use the full page. */
body.kg-citations-page :is(div, main, section, article):has(.kgc):not(.kgc) {
	max-width: none !important;
	width: 100% !important;
	float: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	overflow: visible !important; /* any clipping wrapper would stop the sticky toolbar and sidebar */
}

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

.kgc {
	--kgc-accent: var(--kg-accent, #ef2a24);
	--kgc-accent-dark: #b40000;
	--kgc-text: #1f2328;
	--kgc-muted: #5b6168;
	--kgc-line: #e3e5e8;
	--kgc-soft: #f6f7f8;
	--kgc-stick: 0px; /* height of the site's sticky header, set by the script */
	--kgc-ease: cubic-bezier(.2, .7, .2, 1);
	--kgc-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	max-width: 1560px;
	margin: 0 auto;
	padding: 28px clamp(16px, 3vw, 48px) 80px;
	color: var(--kgc-text);
	font-size: 15px;
	line-height: 1.55;
}
.kgc *, .kgc *::before, .kgc *::after { box-sizing: border-box; }

/* ---------- Hero ---------- */
.kgc-hero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
	gap: 36px 64px;
	align-items: center;
	padding: 48px 52px 44px;
	margin-bottom: 32px;
	background: #fff;
	border: 1px solid var(--kgc-line);
	border-radius: 14px;
	overflow: hidden;
	isolation: isolate;
}
/* fine dot grid fading in from the right, plus the red masthead rule */
.kgc-hero::before {
	content: "";
	position: absolute; inset: 0; z-index: -1;
	background: radial-gradient(circle at 1px 1px, rgba(31, 35, 40, .13) 1.2px, transparent 1.6px) 0 0 / 20px 20px;
	-webkit-mask-image: linear-gradient(to left, #000 0%, transparent 62%);
	mask-image: linear-gradient(to left, #000 0%, transparent 62%);
}
.kgc-hero::after {
	content: "";
	position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--kgc-accent);
}

.kgc-eyebrow {
	display: flex; align-items: center; gap: 12px; margin: 0 0 12px;
	font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--kgc-accent);
}
.kgc-eyebrow__rule { width: 36px; height: 2px; background: var(--kgc-accent); }
.kgc-title {
	margin: 0 0 14px;
	font-family: var(--kgc-serif); font-weight: 600; font-size: 52px; line-height: 1.05; letter-spacing: -.015em;
	color: var(--kgc-text);
}
.kgc-intro { margin: 0 0 28px; max-width: 62ch; color: var(--kgc-muted); font-size: 17px; line-height: 1.65; }

.kgc-search { max-width: 760px; }
.kgc-search__label {
	display: block; margin: 0 0 7px;
	font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--kgc-muted);
}
.kgc-search__field { position: relative; }
.kgc-search__icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--kgc-muted); pointer-events: none; transition: color .2s ease; }
.kgc-search__field:focus-within .kgc-search__icon { color: var(--kgc-accent); }
.kgc .kgc-search__input {
	display: block; width: 100%; height: 64px; margin: 0;
	padding: 0 150px 0 54px;
	background: #fff; color: var(--kgc-text);
	border: 2px solid #cfd3d8; border-radius: 12px;
	font-size: 17px; box-shadow: 0 6px 18px rgba(31, 35, 40, .06);
	-webkit-appearance: none; appearance: none;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--kgc-ease);
}
.kgc .kgc-search__input::placeholder { color: #8a8f96; }
.kgc .kgc-search__input:focus { outline: none; border-color: var(--kgc-accent); box-shadow: 0 0 0 4px rgba(239, 42, 36, .14), 0 8px 22px rgba(31, 35, 40, .08); }
.kgc .kgc-search__input::-webkit-search-cancel-button { display: none; }
.kgc-search__hint { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #8a8f96; pointer-events: none; }
.kgc-search__hint kbd {
	display: inline-block; min-width: 20px; padding: 1px 6px; text-align: center;
	font: 600 12px/1.5 ui-monospace, Menlo, Consolas, monospace; color: var(--kgc-muted);
	background: var(--kgc-soft); border: 1px solid #d5d8dc; border-bottom-width: 2px; border-radius: 4px;
}
.kgc .kgc-search__clear {
	position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
	width: 40px; height: 40px; padding: 0; margin: 0;
	background: #eef0f2; border: 0; border-radius: 50%;
	font-size: 24px; line-height: 1; color: var(--kgc-text); cursor: pointer; transition: background .15s ease;
}
.kgc .kgc-search__clear:hover { background: #e1e4e7; }
.kgc .kgc-search__clear:focus-visible { outline: 2px solid var(--kgc-accent); outline-offset: 1px; }
.kgc .kgc-search__clear[hidden] { display: none; }
.kgc-search__clear:not([hidden]) ~ .kgc-search__hint { display: none; }

.kgc-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; font-size: 13px; color: var(--kgc-muted); }
.kgc .kgc-chip {
	height: 32px; padding: 0 13px; margin: 0;
	font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; text-transform: none;
	color: var(--kgc-accent-dark); background: #fff; border: 1px solid #d5d8dc; border-radius: 999px; cursor: pointer;
	transition: border-color .2s ease, transform .2s var(--kgc-ease), box-shadow .2s ease;
}
.kgc .kgc-chip:hover { border-color: var(--kgc-accent); background: #fff; color: var(--kgc-accent-dark); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(31, 35, 40, .08); }
.kgc .kgc-chip:focus-visible { outline: 2px solid var(--kgc-accent); outline-offset: 2px; }

/* Figures + year chart */
.kgc-figures { display: flex; gap: 0; list-style: none; margin: 0 0 22px; padding: 0; }
.kgc-figures li { flex: 1; margin: 0; padding: 0 22px; border-left: 1px solid var(--kgc-line); }
.kgc-figures li:first-child { padding-left: 0; border-left: 0; }
.kgc-figures strong {
	display: block; font-family: var(--kgc-serif); font-size: 50px; font-weight: 600; line-height: 1; letter-spacing: -.02em;
	color: var(--kgc-text); font-variant-numeric: lining-nums tabular-nums;
}
.kgc-figures span { display: block; margin-top: 6px; font-size: 13px; color: var(--kgc-muted); }

.kgc-years { margin: 0; padding: 18px 18px 12px; background: rgba(255, 255, 255, .86); border: 1px solid var(--kgc-line); border-radius: 12px; }
.kgc-years figcaption { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--kgc-muted); }
.kgc-years__bars { display: flex; align-items: flex-end; gap: 4px; height: 118px; }
.kgc .kgc-yr {
	position: relative; flex: 1 1 0; min-width: 0; height: 100%; padding: 0; margin: 0;
	display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 5px;
	background: none; border: 0; border-radius: 4px; cursor: pointer; text-transform: none; letter-spacing: 0;
}
.kgc .kgc-yr:disabled { cursor: default; }
.kgc-yr__bar {
	display: block; width: 100%; height: var(--h); min-height: 2px;
	background: var(--kgc-accent); border-radius: 3px 3px 0 0;
	transform-origin: bottom; animation: kgc-grow .7s var(--kgc-ease) both;
	transition: background .2s ease, opacity .25s ease, transform .2s var(--kgc-ease);
}
.kgc-yr:disabled .kgc-yr__bar { background: #e3e5e8; height: 2px; }
.kgc-yr__lbl { display: block; flex: 0 0 auto; font-size: 10px; line-height: 1; text-align: center; color: var(--kgc-muted); font-variant-numeric: tabular-nums; }
.kgc .kgc-yr:not(:disabled):hover .kgc-yr__bar { background: var(--kgc-accent-dark); transform: scaleY(1.04); }
.kgc .kgc-yr:focus-visible { outline: 2px solid var(--kgc-accent); outline-offset: 2px; }
.kgc-yr::after {
	content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translate(-50%, 4px);
	padding: 4px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--kgc-text);
	background: #fff; border: 1px solid #cfd3d8; border-radius: 6px; box-shadow: 0 4px 12px rgba(31, 35, 40, .12);
	opacity: 0; pointer-events: none; z-index: 3; transition: opacity .15s ease, transform .15s var(--kgc-ease);
}
.kgc .kgc-yr:hover::after, .kgc .kgc-yr:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.kgc-years.has-selection .kgc-yr:not(.is-on) .kgc-yr__bar { opacity: .28; }
.kgc-yr.is-on .kgc-yr__bar { background: var(--kgc-accent-dark); }
.kgc-yr.is-on .kgc-yr__lbl { color: var(--kgc-accent-dark); font-weight: 700; }
.kgc-years__note { margin: 10px 0 0; font-size: 12px; color: var(--kgc-muted); }

@keyframes kgc-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- Layout: sidebar + results ---------- */
.kgc-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 32px; align-items: start; }

.kgc-side { position: sticky; top: calc(var(--kgc-stick) + 16px); max-height: calc(100vh - var(--kgc-stick) - 32px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.kgc-side__box { background: #fff; border: 1px solid var(--kgc-line); border-radius: 12px; }
.kgc-side__head {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 15px 18px; cursor: pointer; list-style: none;
	font-family: var(--kgc-serif); font-size: 18px; font-weight: 600; color: var(--kgc-text);
}
.kgc-side__head::-webkit-details-marker { display: none; }
.kgc-side__head::marker { content: ""; }
.kgc-side__head::after { content: "+"; font-family: inherit; font-size: 22px; font-weight: 400; line-height: 1; color: var(--kgc-muted); display: none; }
.kgc-side__head:focus-visible { outline: 2px solid var(--kgc-accent); outline-offset: -2px; border-radius: 12px; }
.kgc-side__body { padding: 0 18px 16px; border-top: 1px solid var(--kgc-line); }

.kgc-filter { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.kgc-filter + .kgc-filter { padding-top: 16px; border-top: 1px solid #eef0f2; }
.kgc-filter__title { float: left; width: 100%; padding: 0; margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--kgc-muted); }
.kgc-filter__title + * { clear: both; }

.kgc-check { position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14.5px; line-height: 1.3; transition: background .15s ease; }
.kgc-check:hover { background: var(--kgc-soft); }
.kgc-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kgc-check__box {
	flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid #b8bdc3; border-radius: 5px; background: #fff;
	display: inline-flex; align-items: center; justify-content: center;
	transition: background .15s ease, border-color .15s ease, transform .15s var(--kgc-ease);
}
.kgc-check:active .kgc-check__box { transform: scale(.9); }
.kgc-check input:checked + .kgc-check__box { background: var(--kgc-accent); border-color: var(--kgc-accent); }
.kgc-check__box::after {
	content: ""; width: 9px; height: 5px; margin-top: -2px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
	transform: rotate(-45deg) scale(0); transition: transform .18s var(--kgc-ease);
}
.kgc-check input:checked + .kgc-check__box::after { transform: rotate(-45deg) scale(1); }
.kgc-check input:focus-visible + .kgc-check__box { outline: 2px solid var(--kgc-accent); outline-offset: 2px; }
.kgc-check input:checked ~ .kgc-check__label { font-weight: 600; }
.kgc-check__label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kgc-check__n { font-size: 12px; color: var(--kgc-muted); font-variant-numeric: tabular-nums; }

/* ---------- Sticky toolbar ---------- */
.kgc-results { min-height: 78vh; min-width: 0; }
.kgc-bar {
	position: sticky; top: var(--kgc-stick); z-index: 6;
	margin: 0 0 14px; padding: 12px 0 0; background: #fff;
	transition: box-shadow .25s ease;
}
.kgc-bar.is-stuck { box-shadow: 0 10px 18px -12px rgba(31, 35, 40, .28); }
.kgc-bar__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; min-height: 46px; padding-bottom: 12px; border-bottom: 1px solid var(--kgc-line); }
.kgc-status { margin: 0; flex: 1 1 260px; font-size: 15px; font-weight: 600; color: var(--kgc-text); font-variant-numeric: tabular-nums; }

/* compact search: only appears once the big one has scrolled away */
.kgc-qsearch {
	position: relative; display: none; flex: 0 1 300px; margin: 0;
	animation: kgc-fade .25s var(--kgc-ease) both;
}
.kgc-bar.is-stuck .kgc-qsearch { display: block; }
.kgc-qsearch svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--kgc-muted); pointer-events: none; }
.kgc .kgc-qsearch input {
	display: block; width: 100%; height: 40px; margin: 0; padding: 0 12px 0 38px;
	background: #fff; color: var(--kgc-text); border: 1px solid #cfd3d8; border-radius: 8px; font-size: 14px; box-shadow: none;
	-webkit-appearance: none; appearance: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.kgc .kgc-qsearch input:focus { outline: none; border-color: var(--kgc-accent); box-shadow: 0 0 0 3px rgba(239, 42, 36, .14); }
.kgc .kgc-qsearch input::-webkit-search-cancel-button { display: none; }

.kgc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kgc-sort { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--kgc-muted); }
.kgc .kgc-sort select {
	height: 40px; width: auto; min-width: 160px; margin: 0; padding: 0 32px 0 12px;
	background-color: #fff; color: var(--kgc-text); border: 1px solid #cfd3d8; border-radius: 8px; font-size: 14px;
}
.kgc .kgc-sort select:focus { outline: none; border-color: var(--kgc-accent); box-shadow: 0 0 0 3px rgba(239, 42, 36, .14); }

.kgc .kgc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 40px; padding: 0 16px; margin: 0;
	background: #fff; color: var(--kgc-text); border: 1px solid #cfd3d8; border-radius: 8px;
	font-size: 14px; font-weight: 600; line-height: 1; text-transform: none; letter-spacing: 0; text-decoration: none;
	cursor: pointer; transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s var(--kgc-ease), box-shadow .2s ease;
}
.kgc .kgc-btn:hover { border-color: var(--kgc-accent); color: var(--kgc-accent); background: #fff; }
.kgc .kgc-btn:active { transform: translateY(1px); }
.kgc .kgc-btn:focus-visible { outline: 2px solid var(--kgc-accent); outline-offset: 2px; }
.kgc .kgc-btn--primary { background: var(--kgc-accent); border-color: var(--kgc-accent); color: #fff; }
.kgc .kgc-btn--primary:hover { background: var(--kgc-accent-dark); border-color: var(--kgc-accent-dark); color: #fff; box-shadow: 0 6px 14px rgba(180, 0, 0, .22); }
.kgc .kgc-btn .kgc-arrow { display: inline-block; transition: transform .2s var(--kgc-ease); }
.kgc .kgc-btn:hover .kgc-arrow { transform: translateX(4px); }

/* active filter chips */
.kgc-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0 2px; }
.kgc-active[hidden] { display: none; }
.kgc .kgc-tag {
	display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 12px; margin: 0;
	font-size: 13px; font-weight: 600; line-height: 1; text-transform: none; letter-spacing: 0; color: var(--kgc-text);
	background: var(--kgc-soft); border: 1px solid #d5d8dc; border-radius: 999px; cursor: pointer;
	animation: kgc-pop .28s var(--kgc-ease) both; transition: border-color .15s ease, background .15s ease;
}
.kgc .kgc-tag:hover { border-color: var(--kgc-accent); background: #fff; }
.kgc .kgc-tag:focus-visible { outline: 2px solid var(--kgc-accent); outline-offset: 2px; }
.kgc-tag__x { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; font-size: 14px; line-height: 1; border-radius: 50%; background: #e3e5e8; }
.kgc .kgc-tag:hover .kgc-tag__x { background: var(--kgc-accent); color: #fff; }
.kgc .kgc-tag--clear { background: none; border-color: transparent; color: var(--kgc-accent); text-decoration: underline; text-underline-offset: 3px; padding: 0 6px; }

/* ---------- Empty state ---------- */
.kgc-empty { padding: 44px 24px; margin: 0 0 16px; text-align: center; background: var(--kgc-soft); border: 1px dashed #c9cdd2; border-radius: 12px; animation: kgc-fade .3s var(--kgc-ease) both; }
.kgc-empty[hidden] { display: none; }
.kgc-empty p { margin: 0 0 10px; color: var(--kgc-muted); }
.kgc-empty .kgc-empty__title { font-family: var(--kgc-serif); font-size: 26px; font-weight: 600; color: var(--kgc-text); }

/* ---------- Product rows ---------- */
.kgc-list { display: flex; flex-direction: column; gap: 10px; }
.kgc-item {
	position: relative; background: #fff; border: 1px solid var(--kgc-line); border-radius: 12px;
	scroll-margin-top: calc(var(--kgc-stick) + 96px);
	transition: border-color .25s ease, box-shadow .3s ease, transform .3s var(--kgc-ease);
}
.kgc-item[hidden] { display: none; }
.kgc-item::before {
	content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0;
	background: var(--kgc-accent); transform: scaleY(0); transform-origin: center; transition: transform .35s var(--kgc-ease);
}
.kgc-item:hover { border-color: #c9cdd2; box-shadow: 0 8px 22px rgba(31, 35, 40, .07); transform: translateY(-1px); }
.kgc-item:hover::before, .kgc-item[open]::before, .kgc-item:target::before { transform: scaleY(1); }
.kgc-item[open] { border-color: #c9cdd2; box-shadow: 0 14px 34px rgba(31, 35, 40, .09); }
.kgc-item:target { border-color: var(--kgc-accent); }

.kgc-item__head {
	display: grid; grid-template-columns: 148px minmax(0, 1fr) 190px 34px;
	align-items: center; gap: 20px;
	padding: 18px 22px 18px 24px; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent;
}
.kgc-item__head::-webkit-details-marker { display: none; }
.kgc-item__head::marker { content: ""; }
.kgc-item__head:focus-visible { outline: 2px solid var(--kgc-accent); outline-offset: -2px; border-radius: 12px; }

.kgc-cat {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 15px; font-weight: 700; letter-spacing: .03em; color: var(--kgc-accent-dark);
	padding: 4px 0 4px 12px; border-left: 2px solid var(--kgc-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	transition: border-color .25s ease;
}
.kgc-item:hover .kgc-cat, .kgc-item[open] .kgc-cat { border-left-color: var(--kgc-accent); }
.kgc-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kgc-name { font-size: 16.5px; font-weight: 600; line-height: 1.35; color: var(--kgc-text); overflow-wrap: anywhere; }
.kgc-meta { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--kgc-muted); }

.kgc-count { display: flex; flex-direction: column; gap: 7px; }
.kgc-count__n { font-size: 14px; color: var(--kgc-muted); white-space: nowrap; }
.kgc-count__n b { font-family: var(--kgc-serif); font-size: 22px; font-weight: 600; line-height: 1; color: var(--kgc-text); font-variant-numeric: lining-nums tabular-nums; }
.kgc-meter { display: block; height: 5px; background: #eceef0; border-radius: 999px; overflow: hidden; }
.kgc-meter > span { display: block; height: 100%; background: var(--kgc-accent); border-radius: 999px; transform-origin: left; transition: transform .5s var(--kgc-ease); }
.kgc-item:hover .kgc-meter > span { transform: scaleX(1.0); }

.kgc-toggle {
	display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
	color: var(--kgc-muted); border: 1px solid var(--kgc-line); border-radius: 50%; background: #fff;
	transition: transform .35s var(--kgc-ease), background .25s ease, color .25s ease, border-color .25s ease;
}
.kgc-item:hover .kgc-toggle { border-color: #c9cdd2; }
.kgc-item[open] .kgc-toggle { transform: rotate(180deg); background: var(--kgc-accent); border-color: var(--kgc-accent); color: #fff; }

.kgc-item__body { border-top: 1px solid var(--kgc-line); }
.kgc-item__inner { padding: 6px 24px 24px; }
.kgc-prodlink { margin: 16px 0 6px; }

.kgc-cites { margin: 6px 0 0; padding: 0; list-style: none; }
.kgc-cite {
	display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; align-items: baseline; gap: 4px 20px;
	margin: 0; padding: 16px 0; border-bottom: 1px solid #eef0f2;
}
.kgc-cite:last-child { border-bottom: 0; }
.kgc-cite[hidden] { display: none; }
.kgc-cite__year { font-family: var(--kgc-serif); font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--kgc-accent-dark); font-variant-numeric: lining-nums tabular-nums; }
.kgc-cite__text { font-family: var(--kgc-serif); font-size: 16px; line-height: 1.65; color: var(--kgc-text); overflow-wrap: anywhere; }
.kgc-cite__src { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.kgc-src {
	display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
	padding: 6px 12px; font-family: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.2; text-decoration: none;
	color: var(--kgc-accent-dark); background: #fff; border: 1px solid var(--kgc-accent); border-radius: 999px;
	transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.kgc-src .kgc-arrow { display: inline-block; transition: transform .2s var(--kgc-ease); }
.kgc-src:hover { background: var(--kgc-accent); color: #fff; box-shadow: 0 4px 10px rgba(180, 0, 0, .2); }
.kgc-src:hover .kgc-arrow { transform: translate(2px, -2px); }
.kgc-src:focus-visible { outline: 2px solid var(--kgc-accent); outline-offset: 2px; }
.kgc-src--alt { color: var(--kgc-muted); border-color: #cfd3d8; font-weight: 600; }
.kgc-src--alt:hover { background: var(--kgc-soft); color: var(--kgc-accent-dark); border-color: var(--kgc-accent); box-shadow: none; }
.kgc-none { margin: 16px 0 0; color: var(--kgc-muted); }

/* citations rise in one after another when a product opens */
.kgc-item[open] .kgc-cite, .kgc-item[open] .kgc-prodlink { animation: kgc-rise .45s var(--kgc-ease) both; }
.kgc-item[open] .kgc-cite:nth-child(2) { animation-delay: .04s; }
.kgc-item[open] .kgc-cite:nth-child(3) { animation-delay: .08s; }
.kgc-item[open] .kgc-cite:nth-child(4) { animation-delay: .12s; }
.kgc-item[open] .kgc-cite:nth-child(5) { animation-delay: .16s; }
.kgc-item[open] .kgc-cite:nth-child(6) { animation-delay: .20s; }
.kgc-item[open] .kgc-cite:nth-child(n+7) { animation-delay: .24s; }

@keyframes kgc-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes kgc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kgc-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* Search highlight */
.kgc mark.kgc-mark { background: linear-gradient(transparent 55%, #ffe36e 55%); color: inherit; padding: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
	.kgc-hero { grid-template-columns: 1fr; padding: 36px 28px 30px; }
	.kgc-title { font-size: 42px; }
	.kgc-layout { grid-template-columns: 1fr; gap: 18px; }
	.kgc-side { position: static; max-height: none; overflow: visible; }
	.kgc-side__head::after { display: block; }
	.kgc-side__box[open] > .kgc-side__head::after { content: "\2212"; }
	.kgc-results { min-height: 0; }
	.kgc-item__head { grid-template-columns: 128px minmax(0, 1fr) 150px 34px; gap: 14px; }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
	.kgc { padding-top: 16px; padding-bottom: 56px; }
	.kgc-hero { padding: 26px 18px 22px; gap: 24px; }
	.kgc-title { font-size: 34px; }
	.kgc-intro { font-size: 15px; margin-bottom: 20px; }
	.kgc .kgc-search__input { height: 56px; font-size: 16px; padding: 0 52px 0 48px; }
	.kgc-search__hint { display: none; }
	.kgc-figures strong { font-size: 38px; }
	.kgc-figures li { padding: 0 14px; }
	.kgc-qsearch { flex: 1 1 100%; order: 3; }
	.kgc-tools { width: 100%; }
	.kgc-sort { flex: 1 1 100%; }
	.kgc .kgc-sort select { flex: 1; }
	.kgc .kgc-btn { flex: 1; }
	.kgc-item__head {
		grid-template-columns: minmax(0, 1fr) 34px;
		grid-template-areas: "cat toggle" "main main" "count count";
		gap: 8px 10px; padding: 14px 14px 14px 16px;
	}
	.kgc-cat { grid-area: cat; justify-self: start; }
	.kgc-toggle { grid-area: toggle; }
	.kgc-main { grid-area: main; }
	.kgc-count { grid-area: count; flex-direction: row; align-items: center; gap: 12px; }
	.kgc-meter { flex: 1; }
	.kgc-item__inner { padding: 4px 14px 18px; }
	.kgc-cite { grid-template-columns: 48px minmax(0, 1fr); }
	.kgc-cite__year { font-size: 16px; }
	.kgc-cite__src { grid-column: 2; justify-content: flex-start; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
	.kgc *, .kgc *::before, .kgc *::after { animation: none !important; transition: none !important; }
}

@media print {
	.kgc-search, .kgc-tools, .kgc-toggle, .kgc-side, .kgc-try, .kgc-years, .kgc-qsearch { display: none !important; }
	.kgc-layout { grid-template-columns: 1fr; }
	.kgc-item { break-inside: avoid; }
}
