/* Release history page (/announcements-and-release-history/).
   Loaded after site.css + legacy.css, so it reuses the shared tokens. Every rule
   is scoped under .rh to outrank the legacy Kapital theme's element styles. */

.rh {
	--rh-gutter: clamp(1rem, 0.4rem + 2.5vw, 2rem);
	--rh-radius: 14px;
	--rh-rail: var(--line);
	--rh-hero-top: #e6e7f4;
	--rh-hero-bottom: var(--paper);
	--rh-rust: #b4441f;
	--rh-rust-50: #fbeee8;
	--rh-shadow: 0 1px 2px rgba(18, 20, 27, .05);
	--rh-shadow-hover: 0 1px 2px rgba(18, 20, 27, .06), 0 24px 48px -28px rgba(18, 20, 27, .35);
	--rh-sticky-top: 7.25rem;

	background: var(--paper); color: var(--ink-950);
	font: 400 16px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased;
}
.rh *, .rh *::before, .rh *::after { box-sizing: border-box; }
.rh :where(h1, h2, h3, h4, p, ul, ol, li, figure) { margin: 0; padding: 0; }
.rh :where(ol, ul) { list-style: none; }
.rh a { color: inherit; text-decoration: none; }
/* Neutralize the legacy theme's dl/button/input styling */
.rh dl, .rh dt, .rh dd { margin: 0; padding: 0; border: 0; background: none; float: none; width: auto; text-align: left; }
.rh dt::after, .rh dt::before { content: none; }
.rh button, .rh input {
	width: auto; height: auto; min-height: 0; margin: 0; box-shadow: none; text-shadow: none;
	letter-spacing: normal; text-transform: none; line-height: inherit;
}
.rh .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rh :focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }
.rh .rh-wrap { width: 100%; max-width: calc(1240px + 2 * var(--rh-gutter)); margin: 0 auto; padding: 0 var(--rh-gutter); }

/* ---- Hero ---- */
.rh .rh-hero {
	padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0 clamp(2.5rem, 2rem + 2vw, 3.5rem);
	background:
		radial-gradient(circle at 1px 1px, rgba(74, 79, 196, .12) 1px, transparent 0) 0 0 / 22px 22px,
		linear-gradient(180deg, var(--rh-hero-top) 0%, var(--rh-hero-bottom) 100%);
	border-bottom: 1px solid var(--line);
}
.rh .rh-eyebrow { font: 500 13px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--indigo); margin-bottom: 1rem; }
.rh .rh-hero h1 {
	font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em;
	font-size: clamp(2.5rem, 1.5rem + 3.8vw, 4.25rem); line-height: 1.02; color: var(--ink-950);
}
.rh .rh-lede { max-width: 38rem; margin-top: 1.25rem; font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); color: var(--ink-600); }
.rh .rh-stats { display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; margin-top: 2.25rem; }
.rh .rh-stats div { display: flex; flex-direction: column; gap: .15rem; }
.rh .rh-stats dt { font: 500 12px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }
.rh .rh-stats dd { margin: 0; font: 700 1.5rem/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--ink-950); }

/* ---- Layout ---- */
.rh .rh-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); padding-bottom: clamp(4rem, 3rem + 4vw, 7rem); }
@media (min-width: 1024px) {
	.rh .rh-body { grid-template-columns: 11rem minmax(0, 1fr); gap: 4rem; }
}

/* ---- Toolbar: filter + year index ---- */
.rh .rh-side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
@media (min-width: 1024px) { .rh .rh-side { position: sticky; top: var(--rh-sticky-top); align-self: start; } }
.rh .rh-filter { position: relative; display: block; }
.rh .rh-filter svg { position: absolute; left: .8rem; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--ink-500); stroke-width: 2; stroke-linecap: round; pointer-events: none; z-index: 1; }
.rh .rh-filter input {
	box-sizing: border-box; -webkit-appearance: none; appearance: none;
	width: 100%; height: 44px; margin: 0; padding: 0 .85rem 0 2.3rem;
	border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink-950);
	font: 400 15px/1.4 var(--font-sans); box-shadow: var(--rh-shadow);
	transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.rh .rh-filter input::placeholder { color: var(--ink-500); }
.rh .rh-filter input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(74, 79, 196, .15); }
.rh .rh-count { font: 400 13px/1.4 var(--font-mono); color: var(--ink-500); }

.rh .rh-years { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--rh-gutter)); padding: 0 var(--rh-gutter) .25rem; }
.rh .rh-years::-webkit-scrollbar { display: none; }
.rh .rh-years a {
	display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex: none;
	padding: .4rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white);
	font: 500 14px/1.3 var(--font-sans); color: var(--ink-700);
	transition: background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast);
}
.rh .rh-years a span { font: 400 12px/1 var(--font-mono); color: var(--ink-500); }
.rh .rh-years a:hover { border-color: var(--ink-300); color: var(--ink-950); }
.rh .rh-years a.is-active { background: var(--ink-950); border-color: var(--ink-950); color: var(--white); }
.rh .rh-years a.is-active span { color: var(--ink-300); }
.rh .rh-years a.is-empty { opacity: .4; }
@media (min-width: 1024px) {
	.rh .rh-years { flex-direction: column; gap: 0; overflow: visible; margin: 0; padding: 0; border-left: 1px solid var(--line); }
	.rh .rh-years a { margin-left: -1px; padding: .35rem 0 .35rem 1rem; border: 0; border-left: 2px solid transparent; border-radius: 0; background: none; }
	.rh .rh-years a.is-active { background: none; border-left-color: var(--indigo); color: var(--indigo); }
	.rh .rh-years a.is-active span { color: var(--indigo); }
}

/* ---- Featured latest release ---- */
.rh .rh-latest {
	position: relative; overflow: hidden; margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem);
	padding: clamp(1.5rem, 1rem + 2vw, 2.25rem); border-radius: var(--rh-radius);
	background: var(--ink-950); color: var(--white);
	box-shadow: 0 30px 60px -36px rgba(18, 20, 27, .6);
}
.rh .rh-latest::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(40rem 18rem at 100% 0%, rgba(124, 129, 240, .35), transparent 70%);
}
.rh .rh-latest > * { position: relative; }
.rh .rh-latest__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.rh .rh-latest h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.1; color: var(--white); }
.rh .rh-latest__lede { margin-top: .75rem; max-width: 40rem; color: #c4c7d2; }
.rh .rh-latest__points { display: grid; gap: 1rem; margin-top: 1.75rem; }
@media (min-width: 720px) { .rh .rh-latest__points { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rh .rh-latest__points li { padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .14); }
.rh .rh-latest__points b { display: block; margin-bottom: .3rem; font: 700 1rem/1.3 var(--font-display); color: var(--white); }
.rh .rh-latest__points span { font-size: .9375rem; color: #b4b8c4; }
.rh .rh-latest__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.rh .rh-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .6rem 1.1rem;
	border: 1px solid transparent; border-radius: 6px; font: 600 15px/1.2 var(--font-sans); cursor: pointer;
	transition: background-color var(--duration-fast), border-color var(--duration-fast), transform var(--duration-normal) var(--ease-out-expo);
}
.rh .rh-btn:active { transform: translateY(1px); }
.rh .rh-btn--primary { background: var(--indigo); color: var(--white); }
.rh .rh-btn--primary:hover { background: var(--indigo-600); color: var(--white); }
.rh .rh-btn--ghost { border-color: rgba(255, 255, 255, .22); color: var(--white); }
.rh .rh-btn--ghost:hover { border-color: rgba(255, 255, 255, .5); color: var(--white); }

/* ---- Tags ---- */
.rh .rh-tag { display: inline-flex; align-items: center; padding: .2rem .55rem; border-radius: 999px; font: 500 12px/1.4 var(--font-mono); letter-spacing: .02em; white-space: nowrap; }
.rh .rh-tag--latest { background: var(--indigo); color: var(--white); }
.rh .rh-tag--security { background: var(--rh-rust-50); color: var(--rh-rust); }
.rh .rh-latest .rh-tag--security { background: rgba(244, 162, 97, .16); color: #f4b183; }

/* ---- Timeline ---- */
.rh .rh-empty { padding: 3rem 1rem; text-align: center; color: var(--ink-500); border: 1px dashed var(--line); border-radius: var(--rh-radius); }
.rh .rh-year { scroll-margin-top: var(--rh-sticky-top); }
.rh .rh-year + .rh-year { margin-top: clamp(2.5rem, 2rem + 1.5vw, 3.5rem); }
.rh .rh-year__label {
	display: flex; align-items: baseline; gap: .75rem; margin-bottom: 1.25rem;
	font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); line-height: 1; color: var(--ink-950);
}
.rh .rh-year__label small { font: 400 13px/1 var(--font-mono); letter-spacing: 0; color: var(--ink-500); }

.rh .rh-list { position: relative; display: grid; gap: 1rem; }
.rh .rh-list::before { content: ""; position: absolute; top: .5rem; bottom: .5rem; left: 5px; width: 2px; background: var(--rh-rail); border-radius: 2px; }
.rh .rh-entry { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; padding-left: 1.75rem; scroll-margin-top: var(--rh-sticky-top); }
.rh .rh-entry::before {
	content: ""; position: absolute; left: 0; top: .45rem; width: 12px; height: 12px; border-radius: 50%;
	background: var(--paper); border: 2px solid var(--ink-300);
	transition: border-color var(--duration-fast), background-color var(--duration-fast);
}
.rh .rh-entry:hover::before, .rh .rh-entry:target::before { border-color: var(--indigo); background: var(--indigo); }
.rh .rh-entry__when time { font: 500 13px/1.6 var(--font-mono); color: var(--ink-500); white-space: nowrap; }
@media (min-width: 720px) {
	.rh .rh-list::before { left: calc(6.5rem + 5px); }
	.rh .rh-entry { grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0 1.75rem; padding-left: 0; }
	.rh .rh-entry::before { left: 6.5rem; top: 1.6rem; }
	.rh .rh-entry__when { padding-top: 1.3rem; text-align: right; padding-right: .75rem; }
	.rh .rh-entry__when time { display: block; }
	.rh .rh-entry > .rh-card { grid-column: 2; margin-left: .75rem; }
}

.rh .rh-card {
	min-width: 0; padding: 1.25rem 1.4rem 1rem; border: 1px solid var(--line); border-radius: var(--rh-radius);
	background: var(--white); box-shadow: var(--rh-shadow);
	transition: box-shadow var(--duration-normal) var(--ease-out-expo), border-color var(--duration-fast);
}
.rh .rh-card:hover { border-color: #dcdbd3; box-shadow: var(--rh-shadow-hover); }
.rh .rh-entry:target .rh-card { border-color: var(--indigo-300); box-shadow: 0 0 0 3px var(--indigo-50), var(--rh-shadow-hover); }
.rh .rh-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .6rem; }
.rh .rh-card__title { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: 1.3rem; line-height: 1.25; color: var(--ink-950); }
.rh .rh-card__title a:hover { color: var(--indigo); }

/* Release notes body: legacy WordPress HTML, normalized by the generator */
.rh .rh-card__body { position: relative; font-size: .9375rem; line-height: 1.6; color: var(--ink-600); overflow-wrap: anywhere; }
.rh .rh-card__body.is-clamped { max-height: 13.5rem; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.rh .rh-card__body > * + * { margin-top: .6rem; }
.rh .rh-card__body h4 { margin-top: 1rem; font: 600 12px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-950); }
.rh .rh-card__body ul { display: grid; gap: .3rem; }
.rh .rh-card__body li { position: relative; padding-left: 1.1rem; }
.rh .rh-card__body li::before { content: ""; position: absolute; left: .2rem; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--indigo-300); }
.rh .rh-card__body li > ul { margin-top: .3rem; }
.rh .rh-card__body li > ul > li::before { background: none; border: 1px solid var(--ink-300); }
.rh .rh-card__body a { color: var(--indigo); text-decoration: underline; text-underline-offset: 2px; }
.rh .rh-card__body strong, .rh .rh-card__body b { color: var(--ink-800); font-weight: 600; }
.rh .rh-card__body mark { padding: 0 .2em; border-radius: 3px; background: var(--rh-rust-50); color: var(--rh-rust); }
.rh .rh-card__body pre {
	max-width: 100%; margin: .6rem 0 0; padding: .75rem .9rem; overflow-x: auto; white-space: pre;
	border-radius: 8px; background: #f4f4f0; border: 1px solid var(--line-soft);
	font: 400 13px/1.55 var(--font-mono); color: var(--ink-800); overflow-wrap: normal;
}
.rh .rh-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line-soft); }
.rh .rh-more {
	display: inline-flex; align-items: center; gap: .35rem; margin: 0; padding: .3rem 0; border: 0; background: none; cursor: pointer;
	font: 600 14px/1.3 var(--font-sans); color: var(--ink-700);
}
.rh .rh-more:hover { color: var(--indigo); }
.rh .rh-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--duration-normal) var(--ease-out-expo); }
.rh .rh-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.rh .rh-more[hidden] { display: none; }
.rh .rh-link { margin-left: auto; font: 600 14px/1.3 var(--font-sans); color: var(--indigo); }
.rh .rh-link span { display: inline-block; transition: transform var(--duration-normal) var(--ease-out-expo); }
.rh .rh-link:hover span { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
	.rh *, .rh *::before { transition: none !important; }
	html:has(.rh) { scroll-behavior: auto; }
}
@media (prefers-reduced-motion: no-preference) {
	html:has(.rh) { scroll-behavior: smooth; }
}
