/* Referensi hub + ICD-10 SEO pages. Loaded after app.css by generated pages. */
:root {
    --rx-navy: #001965;
    --rx-navy-2: #173f7a;
    --rx-blue: #4075aa;
    --rx-ink: #172b43;
    --rx-muted: #64748b;
    --rx-line: #e0e8f0;
    --rx-soft: #f5f9fe;
    --rx-tint: #ebf3fc;
}
.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; }
.rx-wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: 32px; }
.rx-hero code, .rx-section code, .rx-aside code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ── Hero ── */
.rx-hero { position: relative; overflow: hidden; padding: 72px 0 64px; color: var(--rx-ink); background: radial-gradient(900px 420px at 90% -20%, #cfe0f7 0%, transparent 60%), linear-gradient(180deg, var(--rx-tint) 0%, #f7fbff 100%); }
.rx-hero::before { content: ""; position: absolute; width: 420px; height: 420px; left: -160px; bottom: -220px; border-radius: 50%; background: #d6e6fa; filter: blur(60px); animation: rx-drift 16s ease-in-out infinite alternate; pointer-events: none; }
.rx-hero > .rx-wrap { position: relative; }
.rx-hero.is-compact { padding: 40px 0 40px; }
.rx-hero h1 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.1; letter-spacing: -.04em; font-weight: 780; margin: 0 0 18px; max-width: 900px; }
.rx-hero.is-compact h1 { font-size: clamp(28px, 3.4vw, 42px); }
.rx-hero h1 span { display: block; background: linear-gradient(100deg, var(--rx-navy) 10%, var(--rx-blue) 55%, var(--rx-navy) 90%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rx-shine 6s linear infinite; }
.rx-eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--rx-navy); margin: 0 0 12px; }
.rx-eyebrow code { letter-spacing: 0; text-transform: none; }
.rx-lead { max-width: 720px; font-size: 17px; line-height: 1.7; color: #52657b; margin: 0 0 28px; }
.rx-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; align-items: center; }
.rx-hero-grid > div:first-child > * { animation: rx-rise .7s cubic-bezier(.2,.7,.2,1) both; }
.rx-hero-grid > div:first-child > *:nth-child(2) { animation-delay: .06s; }
.rx-hero-grid > div:first-child > *:nth-child(3) { animation-delay: .12s; }
.rx-hero-grid > div:first-child > *:nth-child(4) { animation-delay: .18s; }
.rx-hero-grid > div:first-child > *:nth-child(5) { animation-delay: .24s; }
.rx-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; margin: 0 0 18px; background: white; border: 1px solid #d6e4f4; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: #173963; }
.rx-badge i { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px #16a34a22; }

/* ── Search ── */
.rx-search { position: relative; display: flex; align-items: center; max-width: 720px; background: white; border: 1px solid #cddcee; border-radius: 18px; padding: 6px; box-shadow: 0 20px 50px -28px #00196566; transition: border-color .2s ease, box-shadow .2s ease; }
.rx-search:focus-within { border-color: var(--rx-blue); box-shadow: 0 0 0 4px #4075aa22, 0 20px 50px -28px #00196566; }
.rx-search-icon { display: grid; place-items: center; width: 44px; color: #7b8ca3; flex-shrink: 0; }
.rx-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--rx-ink); padding: 14px 4px; }
.rx-search input::-webkit-search-cancel-button { display: none; }
.rx-search button { flex-shrink: 0; min-height: 50px; padding: 0 26px; border: 0; border-radius: 13px; background: var(--rx-navy); color: white; font-weight: 700; font-size: 15px; cursor: pointer; transition: background-color .2s ease, transform .2s ease; }
.rx-search button:hover { background: #000062; transform: translateY(-1px); }
.rx-search.is-compact { max-width: 560px; border-radius: 14px; padding: 4px; box-shadow: none; }
.rx-search.is-compact input { padding: 10px 4px; font-size: 15px; }
.rx-search.is-compact button { min-height: 42px; padding: 0 18px; border-radius: 10px; font-size: 14px; }
.rx-search.is-compact .rx-search-icon { width: 38px; }
.rx-systems { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 12px; background: #ffffffb3; border: 1px solid #d6e4f4; border-radius: 12px; }
.rx-systems button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: #3a5577; font-size: 13.5px; font-weight: 650; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.rx-systems button[aria-pressed="true"] { background: var(--rx-navy); color: white; }
.rx-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--rx-muted); }
.rx-examples a { padding: 6px 12px; background: white; border: 1px solid #d6e4f4; border-radius: 999px; color: var(--rx-ink); font-weight: 600; transition: border-color .2s ease, transform .2s ease; }
.rx-examples a:hover { border-color: var(--rx-blue); transform: translateY(-1px); }
.rx-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; }
.rx-stats strong { display: block; font-size: 22px; font-weight: 780; color: var(--rx-navy); letter-spacing: -.02em; }
.rx-stats span { font-size: 12.5px; color: var(--rx-muted); }

/* Hero visual: mock result card */
.rx-mock { position: relative; background: white; border: 1px solid #dfe9f5; border-radius: 22px; padding: 18px; box-shadow: 0 40px 80px -40px #00196566; animation: rx-zoom .9s cubic-bezier(.2,.7,.2,1) .15s both; }
.rx-mock-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--rx-soft); border: 1px solid var(--rx-line); border-radius: 12px; font-size: 14px; color: var(--rx-ink); margin-bottom: 12px; }
.rx-mock-bar b { font-weight: 600; }
.rx-mock-bar .caret { width: 2px; height: 16px; background: var(--rx-navy); animation: rx-blink 1s steps(1) infinite; }
.rx-mock-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; opacity: 0; animation: rx-rise .5s cubic-bezier(.2,.7,.2,1) forwards; }
.rx-mock-row:nth-child(1) { animation-delay: .5s; }
.rx-mock-row:nth-child(2) { animation-delay: .7s; background: var(--rx-tint); }
.rx-mock-row:nth-child(3) { animation-delay: .9s; }
.rx-mock-row:nth-child(4) { animation-delay: 1.1s; }
.rx-mock-row code { flex-shrink: 0; min-width: 58px; padding: 4px 8px; border-radius: 8px; background: var(--rx-navy); color: white; font-size: 13px; font-weight: 700; text-align: center; }
.rx-mock-row:not(:nth-child(2)) code { background: #e3ecf8; color: var(--rx-navy); }
.rx-mock-row span { font-size: 13.5px; line-height: 1.45; color: var(--rx-ink); }
.rx-mock-row small { display: block; font-size: 12px; color: var(--rx-muted); }
.rx-mock-float { position: absolute; right: -18px; bottom: -18px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: white; border: 1px solid #e1eaf3; border-radius: 14px; box-shadow: 0 16px 36px -18px #00196560; font-size: 12.5px; font-weight: 650; color: var(--rx-ink); animation: rx-float 6s ease-in-out infinite; }
.rx-mock-float img { width: 20px; height: 20px; }

/* ── Breadcrumb ── */
.rx-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 13px; color: var(--rx-muted); }
.rx-crumb a { color: var(--rx-blue); font-weight: 600; }
.rx-crumb a:hover { text-decoration: underline; }
.rx-crumb span[aria-hidden] { color: #b6c4d6; }
.rx-crumb [aria-current] { color: var(--rx-ink); font-weight: 600; }

/* ── Sections ── */
.rx-section { padding: 64px 0; background: white; }
.rx-section.alt { background: var(--rx-soft); }
.rx-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.rx-head h2 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 750; letter-spacing: -.03em; line-height: 1.2; color: var(--rx-ink); margin: 0; }
.rx-head p { max-width: 440px; margin: 0; color: var(--rx-muted); font-size: 15px; line-height: 1.65; }
.rx-head a { font-weight: 650; color: var(--rx-blue); white-space: nowrap; }
.rx-h2 { font-size: 20px; font-weight: 750; letter-spacing: -.02em; margin: 0 0 16px; color: var(--rx-ink); }

/* Popular codes */
.rx-popular { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rx-popular a { display: flex; align-items: center; gap: 12px; padding: 14px; background: white; border: 1px solid var(--rx-line); border-radius: 14px; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.rx-popular a:hover { transform: translateY(-3px); border-color: #bcd3ec; box-shadow: 0 16px 32px -20px #0019654d; }
.rx-popular code { flex-shrink: 0; min-width: 52px; padding: 6px 8px; border-radius: 9px; background: var(--rx-tint); color: var(--rx-navy); font-size: 14px; font-weight: 750; text-align: center; transition: background-color .25s ease, color .25s ease; }
.rx-popular a:hover code { background: var(--rx-navy); color: white; }
.rx-popular span { font-size: 13.5px; line-height: 1.4; color: var(--rx-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Chapters */
.rx-chapters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rx-chapter { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: white; border: 1px solid var(--rx-line); border-radius: 16px; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.rx-chapter:hover { transform: translateY(-3px); border-color: #bcd3ec; box-shadow: 0 16px 32px -20px #0019654d; }
.rx-chapter-no { font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--rx-blue); }
.rx-chapter strong { font-size: 15px; line-height: 1.4; color: var(--rx-ink); }
.rx-chapter-meta { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--rx-muted); }
.rx-chapter-meta code { color: var(--rx-navy); font-weight: 700; }

/* Tool cards (hub categories) */
.rx-tools { display: grid; gap: 40px; }
.rx-tool-group h3 { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--rx-navy); margin: 0 0 14px; }
.rx-tool-group h3 small { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--rx-muted); }
.rx-tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rx-tool { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; background: white; border: 1px solid var(--rx-line); border-radius: 16px; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.rx-tool:hover { transform: translateY(-3px); border-color: #bcd3ec; box-shadow: 0 16px 32px -20px #0019654d; }
.rx-tool.is-soon { background: #fafcff; border-style: dashed; }
.rx-tool.is-soon:hover { transform: none; box-shadow: none; border-color: var(--rx-line); }
.rx-tool-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.rx-tool-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--rx-tint); color: var(--rx-navy); }
.rx-tool-icon svg { width: 22px; height: 22px; }
.rx-tool.is-soon .rx-tool-icon { color: #94a3b8; background: #f1f5f9; }
.rx-tool strong { font-size: 16px; color: var(--rx-ink); }
.rx-tool p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--rx-muted); }
.rx-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.rx-pill.ok { background: #dcfce7; color: #15803d; }
.rx-pill.beta { background: #fef3c7; color: #a16207; }
.rx-pill.soon { background: #f1f5f9; color: var(--rx-muted); }
.rx-filter { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: white; border: 1px solid #d6e4f4; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: #3a5577; cursor: pointer; }
.rx-filter input { width: 16px; height: 16px; accent-color: var(--rx-navy); }

/* Category list (chapter pages) */
.rx-catlist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rx-catlist a { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--rx-line); border-radius: 12px; background: white; transition: border-color .2s ease, background-color .2s ease; }
.rx-catlist a:hover { border-color: #bcd3ec; background: var(--rx-soft); }
.rx-catlist code { flex-shrink: 0; min-width: 48px; padding: 3px 6px; border-radius: 7px; background: var(--rx-tint); color: var(--rx-navy); font-size: 13.5px; font-weight: 750; text-align: center; }
.rx-catlist span { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; color: var(--rx-ink); }
.rx-catlist small { display: block; font-size: 12px; color: var(--rx-muted); }
.rx-catlist em { flex-shrink: 0; font-style: normal; font-size: 11.5px; color: var(--rx-muted); padding-top: 3px; }

/* Code page */
.rx-code-title { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.rx-code-title h1 { margin: 0 0 6px; }
.rx-code-badge { flex-shrink: 0; display: grid; place-items: center; min-width: 88px; height: 64px; padding: 0 14px; border-radius: 18px; background: linear-gradient(135deg, var(--rx-navy), var(--rx-blue)); color: white; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 26px; font-weight: 800; box-shadow: 0 16px 32px -16px #001965; animation: rx-zoom .6s cubic-bezier(.2,.7,.2,1) both; }
.rx-en { margin: 0; font-size: 16px; color: var(--rx-muted); font-style: italic; }
.rx-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.rx-facts div { padding: 10px 14px; background: #ffffffcc; border: 1px solid #dce9f5; border-radius: 12px; }
.rx-facts dt { font-size: 11.5px; color: var(--rx-muted); }
.rx-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 650; color: var(--rx-ink); }
.rx-facts a { color: var(--rx-blue); }
.rx-code-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.rx-table { border: 1px solid var(--rx-line); border-radius: 16px; overflow: hidden; }
.rx-tr { display: grid; grid-template-columns: 96px minmax(0, 1fr) 48px; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid #edf2f8; transition: background-color .2s ease; }
.rx-tr:first-child { border-top: 0; }
.rx-tr:not(.rx-th):hover, .rx-tr:target { background: var(--rx-soft); }
.rx-th { background: var(--rx-soft); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rx-muted); }
.rx-tr code { font-size: 14px; font-weight: 750; color: var(--rx-navy); }
.rx-tr strong { display: block; font-size: 14.5px; font-weight: 600; color: var(--rx-ink); line-height: 1.45; }
.rx-tr small { display: block; font-size: 12.5px; color: var(--rx-muted); margin-top: 2px; }
.rx-copy { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 40px; min-height: 40px; border: 1px solid var(--rx-line); border-radius: 10px; background: white; color: #52657b; cursor: pointer; transition: border-color .2s ease, color .2s ease, background-color .2s ease; }
.rx-copy:hover { border-color: var(--rx-blue); color: var(--rx-navy); }
.rx-copy i { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 4px); padding: 4px 8px; border-radius: 6px; background: var(--rx-ink); color: white; font-size: 11.5px; font-style: normal; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.rx-copy.is-copied { border-color: #16a34a; color: #16a34a; }
.rx-copy.is-copied i { opacity: 1; transform: translate(-50%, 0); }
.rx-copy.is-big { margin-left: auto; padding: 0 16px; min-height: 44px; font-weight: 650; font-size: 14px; }
.rx-note, .rx-disclaimer { font-size: 13.5px; line-height: 1.65; color: var(--rx-muted); }
.rx-note { padding: 16px; background: var(--rx-soft); border-radius: 12px; }
.rx-disclaimer { margin-top: 16px; }
.rx-aside { display: grid; gap: 16px; position: sticky; top: 96px; }
.rx-aside-card { padding: 18px; border: 1px solid var(--rx-line); border-radius: 16px; background: white; }
.rx-aside-card h2 { font-size: 15px; font-weight: 750; margin: 0 0 12px; color: var(--rx-ink); }
.rx-aside-card .rx-search { max-width: none; }
.rx-aside-card.is-brand { background: linear-gradient(135deg, var(--rx-navy), var(--rx-navy-2)); border-color: transparent; color: white; }
.rx-aside-card.is-brand h2 { color: white; }
.rx-aside-card.is-brand p { font-size: 13.5px; line-height: 1.6; color: #c7d7ee; margin: 0 0 14px; }
.rx-aside-card.is-brand a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: white; }
.rx-nearby { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.rx-nearby a { display: flex; gap: 10px; padding: 8px; border-radius: 10px; font-size: 13px; line-height: 1.4; color: var(--rx-ink); transition: background-color .2s ease; }
.rx-nearby a:hover { background: var(--rx-soft); }
.rx-nearby code { flex-shrink: 0; min-width: 40px; font-weight: 750; color: var(--rx-navy); }
.rx-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.rx-pager a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--rx-line); border-radius: 14px; transition: border-color .2s ease, background-color .2s ease; }
.rx-pager a:hover { border-color: #bcd3ec; background: var(--rx-soft); }
.rx-pager a.is-next { text-align: right; }
.rx-pager small { font-size: 12px; font-weight: 700; color: var(--rx-blue); }
.rx-pager span { font-size: 14px; color: var(--rx-ink); }

/* Prose + FAQ */
.rx-prose { max-width: 820px; }
.rx-prose h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 750; letter-spacing: -.03em; color: var(--rx-ink); margin: 0 0 14px; }
.rx-prose h3 { font-size: 18px; font-weight: 700; color: var(--rx-ink); margin: 28px 0 8px; }
.rx-prose p, .rx-prose li { font-size: 15.5px; line-height: 1.75; color: #475569; }
.rx-prose a { color: var(--rx-blue); font-weight: 600; }
.rx-prose code { padding: 1px 6px; border-radius: 6px; background: var(--rx-tint); color: var(--rx-navy); font-weight: 700; }
.rx-faq { max-width: 820px; display: grid; gap: 10px; }
.rx-faq details { background: white; border: 1px solid var(--rx-line); border-radius: 14px; padding: 0 18px; transition: border-color .2s ease; }
.rx-faq details[open] { border-color: #bcd3ec; }
.rx-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-weight: 650; font-size: 15px; color: var(--rx-ink); cursor: pointer; list-style: none; }
.rx-faq summary::-webkit-details-marker { display: none; }
.rx-faq summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--rx-blue); transition: transform .25s ease; }
.rx-faq details[open] summary::after { transform: rotate(45deg); }
.rx-faq details p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.7; color: var(--rx-muted); }

/* CTA band */
.rx-cta { padding: 56px 0; background: white; }
.rx-cta-inner { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 36px; border-radius: 24px; color: white; background: linear-gradient(120deg, #000062, var(--rx-navy-2) 50%, var(--rx-blue)); background-size: 200% 200%; animation: rx-gradient 10s ease infinite; }
.rx-cta-inner::before { content: ""; position: absolute; width: 300px; height: 300px; right: -90px; top: -150px; border-radius: 50%; background: #ffffff14; pointer-events: none; }
.rx-cta-inner > * { position: relative; }
.rx-cta h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 750; letter-spacing: -.02em; margin: 0 0 8px; }
.rx-cta p { margin: 0; max-width: 560px; color: #d9e6f5; font-size: 15px; line-height: 1.6; }
.rx-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.rx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 22px; border-radius: 13px; font-weight: 700; font-size: 15px; transition: transform .2s ease, background-color .2s ease; }
.rx-btn:hover { transform: translateY(-2px); }
.rx-btn.light { background: white; color: var(--rx-navy); }
.rx-btn.ghost { border: 1px solid #ffffff66; color: white; }
.rx-btn.ghost:hover { background: #ffffff14; }

/* Scroll reveal (JS adds .rx-motion to <html>) */
.rx-motion [data-rx-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.rx-motion [data-rx-reveal].is-visible { opacity: 1; transform: none; }

@keyframes rx-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rx-zoom { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes rx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes rx-drift { to { transform: translate(70px, -50px) scale(1.1); } }
@keyframes rx-shine { to { background-position: -200% center; } }
@keyframes rx-blink { 50% { opacity: 0; } }
@keyframes rx-gradient { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

@media (max-width: 1099px) {
    .rx-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .rx-mock { max-width: 520px; }
    .rx-popular, .rx-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rx-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rx-code-layout { grid-template-columns: minmax(0, 1fr); }
    .rx-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rx-aside-card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
    .rx-wrap { padding-inline: 20px; }
    .rx-hero { padding: 40px 0 44px; }
    .rx-hero.is-compact { padding: 28px 0 32px; }
    .rx-lead { font-size: 15.5px; }
    .rx-search input { font-size: 16px; }
    .rx-search button { padding: 0 18px; }
    .rx-systems { display: flex; overflow-x: auto; }
    .rx-systems button { flex: 1 0 auto; }
    .rx-stats { gap: 20px; }
    .rx-mock { display: none; }
    .rx-section { padding: 44px 0; }
    .rx-head { display: block; }
    .rx-head p { margin-top: 8px; }
    .rx-popular, .rx-chapters, .rx-tool-grid, .rx-catlist, .rx-aside { grid-template-columns: minmax(0, 1fr); }
    .rx-code-title { flex-wrap: wrap; gap: 14px; }
    .rx-code-badge { min-width: 72px; height: 54px; font-size: 22px; border-radius: 14px; }
    .rx-code-title > div { flex: 1 1 200px; }
    .rx-copy.is-big { margin-left: 0; }
    .rx-tr { grid-template-columns: 76px minmax(0, 1fr) 40px; padding: 12px; gap: 10px; }
    .rx-pager { grid-template-columns: minmax(0, 1fr); }
    .rx-pager a.is-next { text-align: left; }
    .rx-cta-inner { padding: 26px 20px; }
    .rx-cta-actions { display: grid; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .rx-hero *, .rx-hero::before, .rx-cta-inner, .rx-mock, .rx-mock * { animation: none !important; }
    .rx-mock-row { opacity: 1; }
    .rx-motion [data-rx-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Mobile: compact two-column chapter & tool grids, larger breadcrumb targets */
@media (max-width: 767px) {
    .rx-chapters, .rx-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .rx-chapter { padding: 12px; gap: 4px; border-radius: 14px; }
    .rx-chapter strong { font-size: 13px; line-height: 1.35; }
    .rx-tool { padding: 12px; gap: 4px; border-radius: 14px; }
    .rx-tool strong { font-size: 14px; }
    .rx-tool p { font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .rx-crumb { gap: 2px 6px; }
    .rx-crumb a { display: inline-flex; align-items: center; min-height: 36px; }
}
