/* RestroPress Docs theme. Tokens match restropress.com (restropress-2026 theme). */
:root {
	--navy: #302367;
	--deep: #111a38;
	--ink: #151d3f;
	--muted: #586176;
	--line: #e3e5eb;
	--soft: #f8f9fc;
	--soft-2: #f3f4f8;
	--orange: #ef643d;
	--orange-text: #b43f1d;
	--orange-hover: #8f3015;
	--peach: #fff1e9;
	--lilac: #eeecf7;
	--info-bg: #eef4ff;
	--info-line: #c9dafc;
	--info-ink: #1d4ed8;
	--code-bg: #0a1028;
	--code-line: #263055;
	--radius: 14px;
	--header: 64px;
	--sans: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--display: Poppins, Inter, system-ui, Arial, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
code, pre, kbd, .rpd-hooklist a, .rpd-chip--code, .rpd-article--hook .rpd-title, .rpd-hookindex code, .is-dev .rpd-search__t, .rpd-results__title.is-code { font-variant-ligatures: none; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--orange-text); text-decoration: none; }
a:hover { color: var(--orange-hover); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.25; color: var(--ink); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid rgba(239, 100, 61, .55); outline-offset: 2px; border-radius: 6px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rpd-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; }
.rpd-skip:focus { top: 12px; color: #fff; }
.rpd-wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
kbd { font: 12px/1.4 var(--sans); border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: 1px 6px; color: var(--muted); }
mark { background: #ffd2bf; color: inherit; border-radius: 3px; padding: 0 2px; }

/* Buttons */
.rpd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 600; font-size: 15px; border: 1px solid transparent; background: none; color: var(--ink); white-space: nowrap; }
.rpd-btn--primary { background: var(--navy); color: #fff; }
.rpd-btn--primary:hover { background: #241a52; color: #fff; }
.rpd-btn--outline { border-color: var(--line); background: #fff; }
.rpd-btn--outline:hover { border-color: #cfd3de; color: var(--ink); background: var(--soft); }
.rpd-btn--light { background: #fff; color: var(--deep); }
.rpd-btn--light:hover { color: var(--deep); background: var(--peach); }
.rpd-btn--ghost { border-color: #3a4470; color: #fff; }
.rpd-btn--ghost:hover { border-color: #fff; color: #fff; }
.rpd-btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; font-weight: 500; border-radius: 8px; }
.rpd-iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink); border-radius: 10px; }

/* Header */
.rpd-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.admin-bar .rpd-header { top: 32px; }
.rpd-header__in { max-width: 1440px; margin: 0 auto; height: var(--header); padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.rpd-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: none; }
.rpd-brand:hover { color: var(--ink); }
.rpd-brand__mark { width: 30px; height: 30px; border-radius: 8px; background: var(--navy); display: grid; place-items: center; }
.rpd-brand__mark span { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--orange); }
.rpd-brand__name { font: 700 18px/1 var(--display); }
.rpd-brand__tag { font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.rpd-primary { display: flex; gap: 4px; font-size: 14px; font-weight: 500; }
.rpd-primary a { color: var(--ink); padding: 8px 10px; border-radius: 8px; }
.rpd-primary a:hover { background: var(--soft-2); color: var(--ink); }
.rpd-primary a.is-current { color: var(--orange-text); font-weight: 600; }
.rpd-ext { color: var(--muted); }
.rpd-header__tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.rpd-searchbtn { display: flex; align-items: center; gap: 10px; width: 260px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--muted); font-size: 14px; text-align: left; }
.rpd-searchbtn:hover { border-color: #cfd3de; }
.rpd-searchbtn__label { flex: 1; }
.rpd-menubtn { display: none; width: 44px; height: 44px; place-items: center; border: 0; background: none; color: var(--ink); border-radius: 10px; }
.rpd-header__cta { min-height: 40px; font-size: 14px; padding: 0 16px; }

/* GTranslate dropdown */
.rpd-lang select, .rpd-lang .gt_selector { height: 40px; max-width: 130px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font: 14px var(--sans); color: var(--ink); background: #fff; }
.rpd-lang:empty { display: none; }

/* Drawer (mobile menu) */
.rpd-drawer { position: fixed; inset: 0; z-index: 60; background: rgba(17, 26, 56, .45); }
.rpd-drawer__panel { position: absolute; inset: 0 auto 0 0; width: min(360px, 88vw); background: #fff; overflow-y: auto; padding: 12px 16px 32px; box-shadow: 0 0 40px rgba(17, 26, 56, .25); }
.rpd-drawer__top { display: flex; align-items: center; justify-content: space-between; height: 48px; margin-bottom: 8px; }
.rpd-drawer__links { list-style: none; margin: 0 0 16px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.rpd-drawer__links a { display: block; padding: 11px 10px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.rpd-drawer__links a:hover { background: var(--soft-2); }
body.rpd-locked { overflow: hidden; }

/* Footer */
.rpd-footer { border-top: 1px solid var(--line); background: var(--soft); }
.rpd-footer__in { max-width: 1440px; margin: 0 auto; padding: 28px 24px; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; font-size: 14px; color: var(--muted); }
.rpd-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.rpd-footer a { color: var(--muted); }
.rpd-footer a:hover { color: var(--ink); }

/* Home */
.rpd-hero { background: var(--soft); border-bottom: 1px solid var(--line); }
.rpd-hero__in { padding-top: 72px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.rpd-hero__main { flex: 999 1 560px; min-width: 0; }
.rpd-eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-text); }
.rpd-eyebrow--light { color: #ffb59c; }
.rpd-hero h1 { margin: 0; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; max-width: 720px; }
.rpd-hero__lead { margin: 18px 0 32px; font-size: 18px; color: var(--muted); max-width: 620px; }
.rpd-searchform { display: flex; align-items: center; gap: 12px; max-width: 640px; height: 52px; padding: 0 6px 0 16px; background: #fff; border: 1px solid #cfd3de; border-radius: 12px; color: var(--muted); }
.rpd-searchform:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(48, 35, 103, .12); }
.rpd-searchform input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; font: 16px var(--sans); color: var(--ink); background: transparent; }
.rpd-searchform button { height: 40px; padding: 0 18px; border: 0; border-radius: 9px; background: var(--navy); color: #fff; font-weight: 600; font-size: 15px; }
.rpd-searchform--lg { height: 60px; border-radius: 14px; padding-left: 18px; box-shadow: 0 10px 30px rgba(17, 26, 56, .08); }
.rpd-searchform--lg button { height: 46px; padding: 0 22px; border-radius: 10px; }
.rpd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; font-size: 13px; color: var(--muted); }
.rpd-chip { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.rpd-chip:hover { border-color: var(--orange); color: var(--ink); }
.rpd-chip--code { font-family: var(--mono); font-size: 12.5px; }
.rpd-start { flex: 1 1 360px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.rpd-start__kicker { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.rpd-start h2 { margin: 0 0 18px; font-size: 22px; font-weight: 600; }
.rpd-start ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rpd-start a { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; color: var(--ink); }
.rpd-start a:hover { background: var(--soft); color: var(--ink); }
.rpd-start__num { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--peach); color: var(--orange-text); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.rpd-start__txt { flex: 1; display: grid; }
.rpd-start__txt span { font-size: 14px; color: var(--muted); }
.rpd-start__go { color: var(--muted); }

.rpd-block { padding-top: 64px; }
.rpd-block--last { padding-bottom: 72px; }
.rpd-block__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 24px; }
.rpd-block__head h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.rpd-block__head a { font-weight: 600; font-size: 15px; }
.rpd-topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.rpd-topic { height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.rpd-topic:hover { color: var(--ink); border-color: #cfd3de; box-shadow: 0 8px 24px rgba(17, 26, 56, .07); transform: translateY(-2px); }
.rpd-topic__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.rpd-topic__icon--cool { background: var(--lilac); color: var(--navy); }
.rpd-topic__icon--warm { background: var(--peach); color: var(--orange-text); }
.rpd-topic__title { font: 600 19px/1.3 var(--display); }
.rpd-topic__text { font-size: 15px; color: var(--muted); }
.rpd-topic__meta { margin-top: auto; font-size: 13px; color: var(--muted); }
.rpd-linkgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: 32px; border-top: 1px solid var(--line); }
.rpd-linkgrid a { display: flex; justify-content: space-between; gap: 12px; padding: 16px 4px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.rpd-linkgrid a span { color: var(--muted); transition: transform .15s; }
.rpd-linkgrid a:hover { color: var(--orange-text); }
.rpd-linkgrid a:hover span { transform: translateX(3px); color: var(--orange-text); }
.rpd-devband { background: var(--deep); border-radius: 24px; padding: 48px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; color: #fff; }
.rpd-devband__copy { flex: 1 1 360px; min-width: 0; }
.rpd-devband h2 { margin: 0 0 12px; font-size: 32px; font-weight: 600; color: #fff; }
.rpd-devband__copy > p:not(.rpd-eyebrow) { margin: 0 0 26px; color: #c9cde0; }
.rpd-devband__links { display: flex; flex-wrap: wrap; gap: 10px; }
.rpd-devband__code { flex: 1 1 460px; min-width: 0; margin: 0; background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 16px; overflow: hidden; }
.rpd-devband__code figcaption { padding: 10px 16px; border-bottom: 1px solid var(--code-line); font-size: 13px; color: #9aa3c2; }
.rpd-devband__code .rpd-code { margin: 0; border: 0; border-radius: 0; }
.rpd-help { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.rpd-help__card { height: 100%; display: grid; gap: 6px; padding: 24px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); }
.rpd-help__card--warm { background: var(--peach); border-color: #ffd9c9; }
.rpd-help__card:hover { color: var(--ink); border-color: #cfd3de; }
.rpd-help__card strong { font: 600 18px/1.3 var(--display); }
.rpd-help__card span { color: var(--muted); font-size: 15px; }

/* Docs layout: sidebar | article | on this page */
.rpd-docs { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.rpd-docs.has-toc { grid-template-columns: 280px minmax(0, 1fr) 240px; }
.rpd-docs--dev { grid-template-columns: 310px minmax(0, 1fr); }
.rpd-docs--dev.has-toc { grid-template-columns: 310px minmax(0, 1fr) 240px; }
.rpd-side { border-right: 1px solid var(--line); }
.rpd-side__in { position: sticky; top: var(--header); max-height: calc(100vh - var(--header)); overflow-y: auto; padding: 24px 14px 40px 22px; overscroll-behavior: contain; }
.admin-bar .rpd-side__in { top: calc(var(--header) + 32px); max-height: calc(100vh - var(--header) - 32px); }
.rpd-nav, .rpd-nav ul { list-style: none; margin: 0; padding: 0; }
.rpd-nav { font-size: 14px; }
.rpd-nav__section { margin-bottom: 14px; }
.rpd-nav__head { display: block; padding: 6px 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-radius: 8px; }
.rpd-nav__head:hover { color: var(--ink); }
.rpd-nav__head.is-current { color: var(--orange-text); }
.rpd-nav ul ul { margin-left: 12px; padding-left: 8px; border-left: 1px solid var(--line); }
.rpd-nav ul a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink); line-height: 1.4; }
.rpd-nav ul a:hover { background: var(--soft-2); color: var(--ink); }
.rpd-nav ul a.is-current { background: var(--peach); color: var(--orange-text); font-weight: 600; }

.rpd-tabs { display: flex; gap: 4px; padding: 4px; background: var(--soft-2); border-radius: 10px; margin-bottom: 12px; }
.rpd-tabs button { flex: 1; border: 0; border-radius: 7px; padding: 7px 4px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; }
.rpd-tabs button span { font-size: 11px; opacity: .8; }
.rpd-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(17, 26, 56, .12); }
.rpd-hookfilter { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: 14px var(--sans); margin-bottom: 10px; }
.rpd-hookfilter:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(48, 35, 103, .12); }
.rpd-hooklist { list-style: none; margin: 0; padding: 0; }
.rpd-hooklist a { display: block; padding: 5px 10px; border-radius: 7px; color: var(--ink); font: 12.5px/1.45 var(--mono); word-break: break-all; font-variant-ligatures: none; }
.rpd-hooklist a:hover { background: var(--soft-2); color: var(--ink); }
.rpd-hooklist a.is-current { background: var(--peach); color: var(--orange-text); font-weight: 500; }
.rpd-hooklist__all { font-family: var(--sans) !important; font-weight: 600; font-size: 13px !important; }
.rpd-hooklist__empty { padding: 8px 10px; color: var(--muted); font-size: 13px; }

.rpd-main { min-width: 0; padding: 32px 56px 72px; }
.rpd-article { max-width: 780px; }
.rpd-crumbs { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.rpd-crumbs li + li::before { content: "/"; margin-right: 8px; color: #b6bbc8; }
.rpd-crumbs a { color: var(--muted); }
.rpd-crumbs a:hover { color: var(--ink); }
.rpd-crumbs [aria-current] { color: var(--ink); }
.rpd-badges { margin: 0 0 10px; }
.rpd-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--soft-2); color: var(--muted); font-size: 13px; font-weight: 600; }
.rpd-badge--brand { background: var(--lilac); color: var(--navy); }
.rpd-title { margin: 0 0 14px; font-size: clamp(30px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.rpd-article--hook .rpd-title { font-family: var(--mono); font-weight: 500; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.01em; }
.rpd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.rpd-meta__grow { flex: 1; }
.rpd-subhead { margin: 40px 0 16px; font-size: 22px; font-weight: 600; }

/* Article content */
.rpd-content { font-size: 16.5px; line-height: 1.75; overflow-wrap: break-word; }
.rpd-content > :first-child { margin-top: 24px; }
.rpd-content h2 { margin: 44px 0 12px; font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.rpd-content h3 { margin: 32px 0 10px; font-size: 20px; font-weight: 600; }
.rpd-content h4 { margin: 24px 0 8px; font-size: 17px; }
.rpd-content h2, .rpd-content h3 { position: relative; }
.rpd-anchor { margin-left: 8px; color: #b6bbc8; font-weight: 400; opacity: 0; transition: opacity .15s; }
.rpd-content h2:hover .rpd-anchor, .rpd-content h3:hover .rpd-anchor, .rpd-anchor:focus { opacity: 1; }
.rpd-content p { margin: 0 0 18px; }
.rpd-content a { text-decoration: underline; text-decoration-color: rgba(180, 63, 29, .35); text-underline-offset: 3px; }
.rpd-content a:hover { text-decoration-color: currentColor; }
.rpd-content ul, .rpd-content ol { margin: 0 0 18px; padding-left: 24px; }
.rpd-content li { margin: 4px 0; }
.rpd-content img { width: auto; max-height: 640px; border-radius: 12px; border: 1px solid var(--line); margin: 8px 0; cursor: zoom-in; }
.rpd-content figure { margin: 24px 0; }
.rpd-content figcaption, .rpd-content .wp-caption-text { font-size: 13px; color: var(--muted); margin-top: 6px; }
.rpd-content .wp-caption { max-width: 100%; }
.rpd-content blockquote { margin: 24px 0; padding: 14px 18px; border-radius: 12px; background: var(--info-bg); border: 1px solid var(--info-line); }
.rpd-content blockquote p:last-child { margin-bottom: 0; }
.rpd-content hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.rpd-content :not(pre) > code { font: .88em var(--mono); background: var(--soft-2); border-radius: 6px; padding: 2px 6px; }
.rpd-content strong { font-weight: 600; }
.rpd-content iframe { max-width: 100%; border-radius: 12px; }
.rpd-table { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 12px; }
.rpd-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.rpd-table th, .rpd-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.rpd-table tr:first-child th, .rpd-table tr:first-child td { border-top: 0; }
.rpd-table th, .rpd-table thead td { background: var(--soft); font-weight: 600; }

/* Code */
.rpd-code { position: relative; margin: 0 0 24px; padding: 18px 20px; background: var(--code-bg); color: #e6e8f2; border-radius: 12px; overflow-x: auto; font: 13.5px/1.7 var(--mono); font-variant-ligatures: none; tab-size: 4; }
.rpd-code code { font: inherit; font-variant-ligatures: none; white-space: pre; background: none; padding: 0; color: inherit; }
.rpd-copy { position: absolute; top: 8px; right: 8px; padding: 5px 10px; font-size: 12px; color: #c9cde0; background: #1a2347; border: 1px solid var(--code-line); border-radius: 6px; opacity: 0; transition: opacity .15s; }
.rpd-code:hover .rpd-copy, .rpd-copy:focus { opacity: 1; }
.tk-k { color: #9cc2ff; }
.tk-s { color: #a5e3c4; }
.tk-f { color: #ffb59c; }
.tk-v { color: #f3d58a; }
.tk-c { color: #8a93b4; font-style: italic; }
.tk-n { color: #d7b4ff; }

/* Callouts */
.rpd-callout { display: flex; gap: 14px; margin: 24px 0; padding: 16px 18px; border-radius: 12px; font-size: 15px; line-height: 1.6; }
.rpd-callout svg { flex: none; margin-top: 2px; }
.rpd-callout--info { background: var(--info-bg); border: 1px solid var(--info-line); }
.rpd-callout--info svg { color: var(--info-ink); }

/* Section cards and hook index */
.rpd-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.rpd-card { height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.rpd-card:hover { color: var(--ink); border-color: #cfd3de; box-shadow: 0 6px 18px rgba(17, 26, 56, .06); }
.rpd-card__title { font-weight: 600; }
.rpd-card__text { font-size: 14px; color: var(--muted); line-height: 1.5; }
.rpd-card__meta { margin-top: auto; padding-top: 4px; font-size: 12px; color: var(--muted); }
.rpd-hookindex { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rpd-hookindex a { display: grid; gap: 2px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.rpd-hookindex a:hover { background: var(--soft); color: var(--ink); }
.rpd-hookindex code { font: 500 14px var(--mono); color: var(--navy); overflow-wrap: anywhere; font-variant-ligatures: none; }
.rpd-hookindex span { font-size: 14px; color: var(--muted); }

/* Feedback and pager */
.rpd-feedback { margin-top: 48px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; }
.rpd-feedback__q { font-weight: 600; }
.rpd-feedback__btns { display: flex; gap: 8px; }
.rpd-feedback__btns .rpd-btn { min-width: 64px; }
.rpd-feedback__msg { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--muted); }
.rpd-pager { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rpd-pager a { display: grid; gap: 2px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 600; }
.rpd-pager a:hover { border-color: var(--orange); color: var(--ink); }
.rpd-pager span { font-size: 13px; font-weight: 400; color: var(--muted); }
.rpd-pager__next { grid-column: 2; text-align: right; }

/* On this page */
.rpd-toc__in { position: sticky; top: var(--header); padding: 40px 24px; font-size: 14px; max-height: calc(100vh - var(--header)); overflow-y: auto; }
.rpd-toc__label { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rpd-toc ul, .rpd-toc-mobile ul { list-style: none; margin: 0; padding: 0; }
.rpd-toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); color: var(--muted); line-height: 1.4; }
.rpd-toc .lvl-3 a { padding-left: 24px; font-size: 13px; }
.rpd-toc a:hover { color: var(--ink); }
.rpd-toc a.is-active { border-left-color: var(--orange); color: var(--ink); font-weight: 600; }
.rpd-toc__help { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.rpd-toc__help a { color: var(--muted); }
.rpd-toc-mobile { display: none; margin: 16px 0 0; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.rpd-toc-mobile summary { padding: 12px 16px; font-weight: 600; font-size: 14px; cursor: pointer; }
.rpd-toc-mobile ul { padding: 0 16px 12px; }
.rpd-toc-mobile a { display: block; padding: 6px 0; color: var(--ink); font-size: 14px; }
.rpd-toc-mobile .lvl-3 a { padding-left: 14px; color: var(--muted); }

/* Plain pages, search, 404 */
.rpd-page { padding-top: 48px; padding-bottom: 72px; }
.rpd-page--narrow { max-width: 820px; }
.rpd-page__title { margin: 0 0 18px; font-size: clamp(28px, 3vw, 38px); font-weight: 700; letter-spacing: -.02em; }
.rpd-page__lead { margin: 0 0 24px; font-size: 18px; color: var(--muted); }
.rpd-page__count { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.rpd-page .rpd-searchform { margin-bottom: 8px; }
.rpd-results { margin-top: 36px; }
.rpd-results h2 { font-size: 20px; margin: 0 0 12px; }
.rpd-results h2 span { font: 500 13px var(--sans); color: var(--muted); background: var(--soft-2); border-radius: 999px; padding: 2px 9px; margin-left: 6px; vertical-align: middle; }
.rpd-results > ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rpd-results > ul a { display: grid; gap: 2px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.rpd-results > ul a:hover { background: var(--soft); color: var(--ink); }
.rpd-results__title { font-weight: 600; }
.rpd-results__title.is-code { font: 500 14.5px var(--mono); font-variant-ligatures: none; }
.rpd-results__sec { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rpd-results__text { font-size: 14px; color: var(--muted); }
.rpd-empty { margin-top: 32px; padding: 24px; border-radius: var(--radius); background: var(--soft); border: 1px solid var(--line); }
.rpd-empty h2 { margin: 0 0 6px; font-size: 20px; }
.rpd-empty p { margin: 0; }
.rpd-404 .rpd-linkgrid { margin-top: 32px; }
.nav-links { display: flex; gap: 8px; margin-top: 24px; }
.nav-links .page-numbers { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.nav-links .current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Search dialog */
.rpd-search { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.rpd-search[hidden] { display: none; }
.rpd-search__backdrop { position: absolute; inset: 0; background: rgba(17, 26, 56, .45); }
.rpd-search__dialog { position: relative; width: min(680px, 100%); max-height: 80vh; display: flex; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(17, 26, 56, .35); overflow: hidden; }
.rpd-search__bar { display: flex; align-items: center; gap: 12px; padding: 0 16px 0 20px; height: 62px; border-bottom: 1px solid var(--line); color: var(--muted); flex: none; }
.rpd-search__bar input { flex: 1; min-width: 0; border: 0; outline: none; font: 18px var(--sans); color: var(--ink); background: transparent; }
.rpd-search__bar input::-webkit-search-cancel-button { display: none; }
.rpd-search__esc { font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; background: #fff; color: var(--muted); }
.rpd-search__filters { display: flex; gap: 6px; padding: 10px 20px; border-bottom: 1px solid var(--line); flex: none; }
.rpd-search__filters button { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; background: #fff; color: var(--ink); font-size: 13px; }
.rpd-search__filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.rpd-search__body { overflow-y: auto; padding: 6px 10px 10px; }
.rpd-search__results { list-style: none; margin: 0; padding: 0; }
.rpd-search__group { margin: 12px 10px 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rpd-search__item a { display: flex; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.rpd-search__item[aria-selected="true"] a { background: var(--peach); }
.rpd-search__ico { width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--soft-2); color: var(--muted); font-size: 11px; font-weight: 700; }
.rpd-search__item.is-dev .rpd-search__ico { background: var(--lilac); color: var(--navy); }
.rpd-search__txt { flex: 1; min-width: 0; display: grid; }
.rpd-search__t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-dev .rpd-search__t { font: 500 14px var(--mono); font-variant-ligatures: none; }
.rpd-search__x { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpd-search__s { font-size: 12px; color: var(--muted); flex: none; }
.rpd-search__status { margin: 0; padding: 24px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.rpd-search__status:empty { display: none; }
.rpd-search__foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 20px; border-top: 1px solid var(--line); background: var(--soft); font-size: 12px; color: var(--muted); flex: none; }
.rpd-search__help { margin-left: auto; }
.rpd-search__help a { font-weight: 600; }

/* Image zoom */
.rpd-zoom { position: fixed; inset: 0; z-index: 90; background: rgba(17, 26, 56, .85); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.rpd-zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; background: #fff; }

/* Responsive */
@media (max-width: 1240px) {
	.rpd-docs.has-toc { grid-template-columns: 280px minmax(0, 1fr); }
	.rpd-docs--dev.has-toc { grid-template-columns: 310px minmax(0, 1fr); }
	.rpd-toc { display: none; }
	.rpd-toc-mobile { display: block; }
	.rpd-header__cta { display: none; }
	.rpd-searchbtn { width: 220px; }
}
@media (max-width: 1040px) {
	.rpd-primary { display: none; }
	.rpd-menubtn { display: grid; }
	.rpd-docs, .rpd-docs.has-toc, .rpd-docs--dev, .rpd-docs--dev.has-toc { grid-template-columns: minmax(0, 1fr); }
	.rpd-side { display: none; }
	.rpd-main { padding: 24px 24px 56px; }
	.rpd-article { margin: 0 auto; }
}
@media (max-width: 640px) {
	.rpd-header__in { padding: 0 8px 0 16px; gap: 8px; }
	.rpd-searchbtn { width: 44px; padding: 0; justify-content: center; border: 0; background: none; color: var(--ink); }
	.rpd-searchbtn__label, .rpd-searchbtn__kbd { display: none; }
	.rpd-lang { display: none; }
	.rpd-drawer .rpd-lang { display: block; }
	.rpd-wrap { padding: 0 16px; }
	.rpd-main { padding: 20px 16px 48px; }
	.rpd-hero__in { padding-top: 40px; padding-bottom: 40px; gap: 28px; }
	.rpd-hero__lead { font-size: 16px; margin-bottom: 22px; }
	.rpd-searchform--lg { height: 54px; }
	.rpd-searchform--lg button { display: none; }
	.rpd-start { padding: 20px; }
	.rpd-block { padding-top: 48px; }
	.rpd-block__head h2 { font-size: 23px; }
	.rpd-devband { padding: 28px 20px; border-radius: 18px; }
	.rpd-devband h2 { font-size: 26px; }
	.rpd-content { font-size: 16px; }
	.rpd-content h2 { font-size: 22px; }
	.rpd-code { font-size: 12.5px; padding: 14px 16px; margin-left: -16px; margin-right: -16px; border-radius: 0; }
	.rpd-pager { grid-template-columns: minmax(0, 1fr); }
	.rpd-pager__next { grid-column: 1; }
	.rpd-search { padding: 0; }
	.rpd-search__dialog { max-height: 100%; height: 100%; border-radius: 0; }
	.rpd-search__foot span:not(.rpd-search__help) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
	.rpd-header, .rpd-side, .rpd-toc, .rpd-footer, .rpd-feedback, .rpd-pager, .rpd-meta button, .rpd-copy, .rpd-toc-mobile { display: none !important; }
	.rpd-docs { display: block; }
	.rpd-main { padding: 0; }
	.rpd-code { white-space: pre-wrap; background: #f3f4f8; color: #151d3f; }
}

/* Hook parameters ("$name -> description" lines in old docs) */
.rpd-params { list-style: none; margin: 0 0 22px !important; padding: 0 !important; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rpd-params li { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 4px 18px; margin: 0 !important; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.rpd-params li:first-child { border-top: 0; }
.rpd-params code { font: 500 13.5px var(--mono) !important; background: none !important; padding: 0 !important; color: var(--navy); }
.rpd-params span { color: var(--muted); }
@media (max-width: 640px) { .rpd-params li { grid-template-columns: 1fr; } }
.rpd-lang--drawer { display: none; margin: 0 0 16px; }
@media (max-width: 640px) { .rpd-drawer .rpd-lang--drawer { display: block; } .rpd-lang--drawer select { max-width: none; width: 100%; } }
