/* KhoRevit V8.4.8 – legacy Flatsome page replacements and quick contacts. */

/* WordPress menu hierarchy: allow dropdowns without loading the Flatsome theme. */
.mainlinks > ul.menu { display: contents; list-style: none; padding: 0; margin: 0; }
.mainlinks li { position: relative; list-style: none; }
.mainlinks li.menu-item-has-children { padding-right: 14px; }
.mainlinks li.menu-item-has-children > a { display: inline-flex; align-items: center; min-height: 34px; }
.mainlinks .khv-submenu-toggle {
  position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
  display: inline-grid; place-items: center; border: 0; background: transparent;
  color: #28558c; width: 24px; height: 30px; padding: 0; font-size: 20px; font-weight: 700;
}
.mainlinks ul.sub-menu {
  position: absolute; top: calc(100% - 1px); left: -15px; z-index: 35;
  display: none; flex-direction: column; gap: 2px; width: max-content; min-width: 210px;
  margin: 0; padding: 10px; list-style: none; border: 1px solid #dce7f7;
  background: white; border-radius: 13px; box-shadow: 0 16px 36px #11397028;
  white-space: normal;
}
.mainlinks li:hover > ul.sub-menu,
.mainlinks li:focus-within > ul.sub-menu,
.mainlinks li.khv-expanded > ul.sub-menu { display: flex; }
.mainlinks ul.sub-menu a { display: block; padding: 11px 12px; border-radius: 8px; color: #174479; font-size: 13px; }
.mainlinks ul.sub-menu a:hover, .mainlinks ul.sub-menu a:focus-visible { background: #edf5ff; color: #146cce; }

/* Page titles and cards, following the new blue/white design language. */
.khv848-page { min-height: 60vh; color: #254367; }
.khv848-page-hero { padding: 58px 0 54px; background: linear-gradient(120deg, #eff6ff 0%, #f8fbff 72%, #e9f3ff 100%); border-bottom: 1px solid #e4edfa; }
.khv848-eyebrow { display: inline-flex; color: #2073d5; font-size: 12px; font-weight: 800; letter-spacing: 1.5px; }
.khv848-page-hero h1 { color: #0d3b78; font-size: clamp(28px, 3.7vw, 43px); letter-spacing: -1.2px; line-height: 1.28; margin: 12px 0 13px; }
.khv848-page-hero p { color: #6683a3; font-size: 16px; line-height: 1.85; margin: 0; max-width: 730px; }
.khv848-section { padding: 56px 0 66px; }
.khv848-section-muted { background: #f7faff; }
.khv848-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.khv848-section-heading h2 { font-size: clamp(23px, 3vw, 30px); color: #10417f; line-height: 1.35; margin: 0 0 7px; }
.khv848-section-heading p { margin: 0; color: #70859f; font-size: 14px; line-height: 1.7; }
.khv848-text-link { color: #1768c9; font-size: 14px; font-weight: 800; white-space: nowrap; }
.khv848-text-link:hover { color: #0c417f; }
.khv848-library-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.khv848-library-cats .category-text strong { font-size: 14px; }

/* Legacy YouTube and Media gallery without UX shortcodes. */
.khv848-video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px; }
.khv848-video-card { background: white; border: 1px solid #e0eafa; border-radius: 16px; box-shadow: 0 5px 18px #1749860b; overflow: hidden; min-width: 0; }
.khv848-video-frame { aspect-ratio: 16 / 9; background: #092953; }
.khv848-video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.khv848-video-meta { display: flex; align-items: center; gap: 13px; padding: 16px 18px; }
.khv848-video-meta .khv848-number { display: grid; place-items: center; background: #e9f3ff; color: #1c6bd0; border-radius: 8px; font-weight: 800; padding: 8px; }
.khv848-video-meta h3 { color: #174679; font-size: 16px; margin: 0; }
.khv848-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.khv848-gallery-image { background: #fff; border: 1px solid #e0eafa; border-radius: 15px; padding: 8px; overflow: hidden; display: block; }
.khv848-gallery-image img { display: block; width: 100%; height: 235px; object-fit: cover; border-radius: 10px; transition: transform .2s; }
.khv848-gallery-image:hover img { transform: scale(1.025); }
.khv848-muted-note { color: #7a8fa9; font-size: 14px; }

/* Archive guides are compact readable cards rather than blank tall rows. */
.khv848-article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.khv848-article-card { display: flex; flex-direction: column; border: 1px solid #e0eafa; border-radius: 16px; background: white; overflow: hidden; min-width: 0; transition: transform .2s, box-shadow .2s; }
.khv848-article-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px #16498815; }
.khv848-article-cover { display: grid; place-items: center; aspect-ratio: 16 / 10; background: linear-gradient(130deg, #e1efff, #f5faff); color: #2b76cb; overflow: hidden; }
.khv848-article-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.khv848-article-cover span { font-size: 100px; font-weight: 800; opacity: .24; }
.khv848-article-content { display: flex; flex-direction: column; align-items: flex-start; padding: 20px 22px 24px; flex: 1; }
.khv848-article-date { font-size: 12px; font-weight: 700; color: #7892b1; }
.khv848-article-content h2 { margin: 12px 0 9px; font-size: 17px; line-height: 1.55; color: #103d79; overflow-wrap: anywhere; }
.khv848-article-content h2 a:hover { color: #2278dc; }
.khv848-article-content p { color: #6f839b; font-size: 14px; line-height: 1.75; margin: 0 0 21px; }
.khv848-article-content .khv848-text-link { margin-top: auto; }
.khv848-pagination { display: flex; justify-content: center; padding-top: 33px; }
.khv848-pagination .nav-links { display: flex; gap: 9px; flex-wrap: wrap; }
.khv848-pagination a, .khv848-pagination span { display: inline-block; color: #115bb7; background: #eef5ff; padding: 10px 14px; border-radius: 8px; }
.khv848-pagination .current { background: #1767c9; color: #fff; }

/* Contact page with native or WPForms form. */
.khv848-contact-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: 28px; align-items: start; }
.khv848-contact-details, .khv848-contact-form-card { min-width: 0; background: white; border: 1px solid #dfeaf8; border-radius: 20px; padding: 30px; box-shadow: 0 12px 35px #164b8810; }
.khv848-contact-details h2, .khv848-contact-form-card h2 { margin: 0 0 10px; font-size: 25px; line-height: 1.4; color: #114680; }
.khv848-contact-details > p, .khv848-contact-form-card > p { margin: 0 0 23px; color: #6a809b; font-size: 14px; line-height: 1.75; }
.khv848-contact-method { display: flex; align-items: center; gap: 13px; padding: 12px 8px; border-bottom: 1px solid #edf2f9; }
.khv848-contact-method > span:nth-child(2) { flex: 1; min-width: 0; }
.khv848-contact-method strong { display: block; color: #10457e; font-size: 15px; margin-bottom: 5px; }
.khv848-contact-method small { display: block; color: #8396ae; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.khv848-contact-method b { color: #9db4d0; font-size: 18px; }
.khv848-method-icon { width: 45px; height: 45px; flex: 0 0 45px; display: grid; place-items: center; color: white; font-size: 22px; font-weight: 800; border-radius: 13px; }
.khv848-method-zalo { background: #23a74f; }.khv848-method-facebook { background: #146cc8; }.khv848-method-phone { background: #ff9b08; }.khv848-method-email { background: #5f7fa9; }
.khv848-support-tip { margin-top: 25px; padding: 17px 18px; background: #eef6ff; border-radius: 13px; border: 1px solid #dceafd; }
.khv848-support-tip strong { color: #17569e; font-size: 14px; }
.khv848-support-tip p { color: #607997; font-size: 13px; line-height: 1.8; margin: 9px 0 0; }
.khv848-contact-form-card .khv848-eyebrow { margin-bottom: 10px; }
.khv848-support-form { display: flex; flex-direction: column; gap: 18px; }
.khv848-form-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.khv848-support-form label { display: block; min-width: 0; color: #254e7d; font-size: 14px; font-weight: 700; }
.khv848-support-form label span { color: #ec5b45; }
.khv848-support-form input, .khv848-support-form select, .khv848-support-form textarea { width: 100%; min-width: 0; display: block; margin-top: 7px; font: inherit; color: #24436c; font-weight: 400; background: #fdfefe; border: 1px solid #d8e5f5; border-radius: 10px; padding: 13px; outline: none; }
.khv848-support-form input:focus, .khv848-support-form select:focus, .khv848-support-form textarea:focus { border-color: #2978de; box-shadow: 0 0 0 3px #277bd51c; }
.khv848-support-form textarea { min-height: 130px; resize: vertical; }
.khv848-support-form button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; border: 0; border-radius: 11px; padding: 14px 25px; background: linear-gradient(100deg, #105ebf, #2680e9); color: #fff; font-size: 15px; font-weight: 800; }
.khv848-support-form > small { color: #8497ad; font-size: 12px; }
.khv848-form-honeypot { position: absolute; left: -9999px; height: 1px; width: 1px; overflow: hidden; }
.khv848-form-alert { padding: 13px 16px; margin: 0 0 20px; border-radius: 9px; line-height: 1.6; }
.khv848-success { color: #167345; background: #e5f9ed; }.khv848-error { color: #9c3b2a; background: #fff0eb; }
.khv848-wpforms .wpforms-field input, .khv848-wpforms .wpforms-field textarea, .khv848-wpforms .wpforms-field select { max-width: 100%; }

/* WooCommerce My Account – keep real endpoints, translate their interface. */
.khv848-account-dashboard h2 { color: #10457f; font-size: 23px; margin: 0 0 12px; }
.khv848-account-dashboard p { color: #66809e; font-size: 15px; line-height: 1.85; margin: 0 0 21px; }
.khv848-account-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.khv848-account-shortcuts a { display: flex; flex-direction: column; gap: 8px; padding: 17px; background: #f0f7ff; border: 1px solid #deebfa; border-radius: 12px; }
.khv848-account-shortcuts a strong { color: #1955a0; font-size: 14px; }
.khv848-account-shortcuts a span { color: #738daa; font-size: 12px; line-height: 1.6; }

/* Floating contact shortcuts – gradient pills, icons, subtle motion. */
.khv848-contact-float { position: fixed !important; right: 20px; bottom: 23px; z-index: 9997; display: flex !important; flex-direction: column; gap: 9px; align-items: flex-end; visibility: visible; opacity: 1; pointer-events: none; }
.khv848-contact-float a { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; min-width: 176px; padding: 9px 14px 9px 9px; border: 1px solid #ffffff52; border-radius: 999px; color: #fff !important; font-size: 13px; line-height: 1.35; font-weight: 800; box-shadow: 0 10px 24px #06255031; transition: transform .2s, box-shadow .2s; }
.khv848-contact-float a:hover, .khv848-contact-float a:focus-visible { transform: translateX(-5px); box-shadow: 0 14px 27px #06255046; }
.khv848-contact-float a > span:nth-child(2) { flex: 1; white-space: nowrap; }
.khv848-contact-symbol { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; background: #ffffff29; border: 1px solid #ffffff3f; border-radius: 50%; font-size: 19px; }
.khv848-contact-zalo { background: linear-gradient(105deg, #1fa64d, #44c16a); }
.khv848-contact-facebook { background: linear-gradient(105deg, #1261b6, #2785e7); }
.khv848-contact-hotline { background: linear-gradient(105deg, #f18704, #ffad19); }

/* The post category archive must not become an inner, clipped scroll pane. */
body.category .khv848-articles-page,
body.category .khv848-articles-page .khv848-section {
  height: auto; max-height: none; overflow: visible;
}

/* Legacy page-transition effects can make a fixed child scroll with the body.
   Keep the article archive rooted in the viewport, like the other tabs. */
html:has(body.category), body.category {
  transform: none !important;
  perspective: none !important;
  filter: none !important;
}
/* The archive JS restores a single scrollbar only when no modal is visible. */
body.category .header {
  position: sticky !important;
  top: 0 !important;
  min-height: 84px;
  overflow: visible !important;
  z-index: 90;
}
body.category .header .nav { min-height: 84px; }
body.admin-bar.category .header { top: 32px !important; }
@media (max-width: 782px) {
  body.admin-bar.category .header { top: 46px !important; }
}
body.category .khv848-contact-float {
  position: fixed !important;
  inset: auto 20px 23px auto !important;
  transform: none !important;
  margin: 0 !important;
  z-index: 9997;
}

/* V8.4.9 – restored homepage areas, using real product and member data. */
.khv849-popular-section { background: #fff; }
.khv849-home-media { overflow: hidden; }
.khv849-home-video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.khv849-home-video-grid .khv848-video-card { min-width: 0; }
.khv849-home-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.khv849-home-gallery a { display: block; border: 1px solid #dce9f9; border-radius: 13px; overflow: hidden; background: #fff; padding: 7px; }
.khv849-home-gallery img { display: block; width: 100%; height: 185px; object-fit: cover; border-radius: 9px; }
.khv849-home-guides .khv848-article-grid { gap: 23px; }
.khv849-home-stats { background: linear-gradient(128deg, #0b3778, #145bb4); color: #fff; }
.khv849-home-stats .section-heading h2 { color: #fff; }
.khv849-home-stats .section-heading .kicker { color: #a4d0ff; }
.khv849-home-stats .section-desc { color: #d1e1f7; }
.khv849-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.khv849-stat-grid > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 23px 18px; text-align: center; border: 1px solid #ffffff2c; background: #ffffff0d; border-radius: 16px; }
.khv849-stat-grid > div > span { font-size: 25px; line-height: 1; opacity: .8; }
.khv849-stat-grid strong { font-size: clamp(25px, 2.6vw, 34px); line-height: 1.2; font-weight: 800; }
.khv849-stat-grid small { color: #c9def7; font-size: 13px; line-height: 1.5; }
.khv849-donate-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, .6fr); align-items: center; gap: 32px; padding: 38px 46px; background: #fff; border: 1px solid #dce7f6; border-radius: 23px; box-shadow: 0 12px 34px #19447b0e; }
.khv849-donate-copy h2 { font-size: clamp(23px, 3vw, 32px); color: #104383; line-height: 1.35; margin: 13px 0 14px; }
.khv849-donate-copy p { color: #607c9c; font-size: 15px; line-height: 1.85; }
.khv849-donate-copy .khv849-donate-note { background: #fff6e6; border-left: 3px solid #efa12c; padding: 12px 14px; color: #7c664b; border-radius: 0 9px 9px 0; font-size: 13px; }
.khv849-donate-link { display: inline-block; margin-top: 10px; padding: 12px 18px; border-radius: 10px; background: #e9f3ff; color: #145dae; font-weight: 800; font-size: 13px; }
.khv849-donate-qr { text-align: center; justify-self: center; max-width: 250px; }
.khv849-donate-qr img { width: 100%; height: auto; display: block; border: 1px solid #e0eafa; border-radius: 14px; padding: 8px; background: white; }
.khv849-donate-qr span { display: block; margin-top: 12px; color: #7087a3; font-size: 12px; line-height: 1.6; }

/* Customer-facing help, policy, about and individual Revit tutorial pages. */
.khv849-article-shell { width: min(890px, calc(100% - 48px)); max-width: 100%; }
.khv849-article-shell a:not(.primary-btn) { color: #1269c6; font-weight: 700; }
.khv849-guide-intro { padding: 20px 25px; background: #ecf5ff; border: 1px solid #d5e8ff; border-radius: 14px; margin-bottom: 30px; }
.khv849-guide-intro strong { color: #1155a6; font-size: 17px; }
.khv849-guide-intro p { line-height: 1.9; margin: 7px 0 0; color: #607a99; font-size: 15px; }
.khv849-step-list { display: grid; gap: 19px; }
.khv849-step-list article { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 15px; border: 1px solid #e1eafa; border-radius: 15px; padding: 23px; }
.khv849-step-list article > span { display: grid; place-items: center; height: 54px; width: 54px; background: #e9f3ff; color: #1769c9; font-size: 19px; font-weight: 800; border-radius: 13px; }
.khv849-step-list h2, .khv849-policy h2 { color: #134a8b; font-size: 20px; line-height: 1.5; margin: 0 0 8px; }
.khv849-step-list p, .khv849-policy p { color: #596f8a; font-size: 15px; line-height: 1.9; margin: 0 0 12px; }
.khv849-step-list p:last-child, .khv849-policy p:last-child { margin-bottom: 0; }
.khv849-step-list code { display: inline; padding: 2px 6px; color: #15549b; border-radius: 4px; background: #edf5ff; white-space: normal; overflow-wrap: anywhere; }
.khv849-help-cta { background: linear-gradient(115deg, #0d3c80, #176ccd); color: white; border-radius: 18px; padding: 28px 30px; margin-top: 30px; }
.khv849-help-cta h2 { color: white; font-size: 23px; margin: 0 0 10px; }
.khv849-help-cta p { color: #d7e7fa; font-size: 14px; line-height: 1.8; margin: 0 0 18px; }
.khv849-help-cta a { display: inline-block; background: white; color: #1158ae!important; padding: 11px 17px; border-radius: 8px; font-weight: 800; font-size: 13px; }
.khv849-policy > section { border-bottom: 1px solid #e3edf7; padding: 22px 0; }
.khv849-policy > section:first-child { padding-top: 0; }
.khv849-policy > section:last-of-type { border: 0; }
.khv849-about-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 40px; }
.khv849-about-copy h2 { color: #113d7a; font-size: clamp(23px, 3vw, 33px); line-height: 1.4; margin: 12px 0; }
.khv849-about-copy p { color: #607994; font-size: 15px; line-height: 1.9; }
.khv849-about-copy .primary-btn { margin-top: 14px; }
.khv849-about-image img { width: 100%; height: auto; max-height: 440px; object-fit: contain; }

/* Long-form article typography and comments. */
.khv849-post-heading { max-width: 970px; }
.khv849-post-heading h1 { max-width: 940px; }
.khv849-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 25px; color: #7291b3; font-size: 13px; }
.khv849-breadcrumbs a { color: #236ec2; }
.khv849-post-meta { color: #7890ac!important; font-size: 13px!important; }
.khv849-post-hero-image { margin: 0 0 30px; }
.khv849-post-hero-image img { display: block; width: 100%; height: auto; max-height: 500px; border-radius: 16px; object-fit: cover; }
.khv849-prose { font-size: 16px; line-height: 1.95; color: #304e71; overflow-wrap: anywhere; }
.khv849-prose h2 { color: #164b88; font-size: 25px; margin: 33px 0 15px; line-height: 1.45; }
.khv849-prose h3 { color: #164b88; font-size: 20px; margin: 28px 0 12px; }
.khv849-prose p, .khv849-prose ul, .khv849-prose ol { margin: 15px 0; }
.khv849-prose a { color: #1667cc; text-decoration: underline; }
.khv849-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.khv849-prose iframe { max-width: 100%; }
.khv849-prose blockquote { border-left: 4px solid #277ad6; background: #f2f8ff; padding: 15px 20px; margin: 25px 0; border-radius: 0 8px 8px 0; }
.khv849-prose pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #102c53; color: white; border-radius: 10px; padding: 17px; }
.khv849-prose table { display: block; max-width: 100%; overflow-x: auto; }
.khv849-article-video { margin: 25px 0; border-radius: 13px; overflow: hidden; }
.khv849-post-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid #e2ecf7; margin-top: 42px; padding-top: 25px; color: #627b9a; }
.khv849-post-bottom a { display: inline-block; color: #fff!important; background: #1769d1; padding: 12px 16px; border-radius: 8px; font-weight: 800; }
.khv849-post-comments { margin-top: 35px; border: 1px solid #e1eaf6; border-radius: 15px; padding: 25px; }
.khv849-post-comments input, .khv849-post-comments textarea { max-width: 100%; }
.khv849-legacy-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.khv849-legacy-row > div { min-width: 0; }

@media (max-width: 1100px) {
  .khv848-library-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .khv848-article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .khv849-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .mainlinks { max-height: calc(100dvh - 74px); overflow-y: auto; }
  .mainlinks > ul.menu { display: flex !important; flex-direction: column; gap: 0; width: 100%; padding: 0; margin: 0; }
  .mainlinks > ul.menu > li { border-bottom: 1px solid #ebf2fa; width: 100%; }
  .mainlinks > ul.menu > li > a { display: block; padding: 12px 2px; font-size: 15px; }
  .mainlinks li.menu-item-has-children { padding-right: 0; }
  .mainlinks li.menu-item-has-children > a { display: block; padding-right: 45px; }
  .mainlinks .khv-submenu-toggle { right: 0; top: 6px; transform: none; width: 40px; height: 39px; }
  .mainlinks ul.sub-menu { position: static; left: auto; top: auto; display: none; width: 100%; min-width: 0; border: none; padding: 3px 0 10px 13px; box-shadow: none; border-radius: 0; background: #f7fbff; }
  .mainlinks li:not(.khv-expanded) > ul.sub-menu { display: none; }
  .mainlinks li.khv-expanded > ul.sub-menu { display: flex; }
  .khv848-library-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .khv848-contact-layout { grid-template-columns: 1fr; }
  .khv848-account-shortcuts { grid-template-columns: 1fr; }
  .khv849-donate-card, .khv849-about-grid { grid-template-columns: minmax(0, 1fr); }
  .khv849-donate-qr { max-width: 230px; }
}
@media (max-width: 600px) {
  .khv848-page-hero { padding: 39px 0 42px; }
  .khv848-page-hero p { font-size: 14px; }
  .khv848-section { padding: 40px 0 48px; }
  .khv848-section-heading { align-items: flex-start; flex-wrap: wrap; gap: 11px; }
  .khv848-library-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .khv848-video-grid, .khv848-article-grid { grid-template-columns: minmax(0, 1fr); }
  .khv848-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .khv848-gallery-image img { height: 140px; }
  .khv848-contact-details, .khv848-contact-form-card { padding: 21px; }
  .khv848-form-two { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .khv848-contact-float { right: 9px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); gap: 6px; }
  body.category .khv848-contact-float { inset: auto 9px calc(12px + env(safe-area-inset-bottom, 0px)) auto !important; }
  .khv848-contact-float a { min-width: 128px; gap: 7px; padding: 6px 10px 6px 6px; font-size: 11px; box-shadow: 0 7px 17px #082c6c30; }
  .khv848-contact-symbol { width: 26px; height: 26px; flex-basis: 26px; font-size: 15px; }
  .khv849-home-video-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .khv849-home-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .khv849-home-gallery img { height: 125px; }
  .khv849-stat-grid { gap: 9px; }
  .khv849-stat-grid > div { padding: 17px 10px; }
  .khv849-stat-grid strong { font-size: 24px; }
  .khv849-stat-grid small { font-size: 11px; }
  .khv849-donate-card { padding: 25px 20px; gap: 20px; }
  .khv849-article-shell { width: calc(100% - 30px); }
  .khv849-step-list article { grid-template-columns: 1fr; padding: 19px; gap: 11px; }
  .khv849-step-list article > span { width: 46px; height: 46px; }
  .khv849-guide-intro { padding: 16px 18px; }
  .khv849-help-cta { padding: 24px 20px; }
  .khv849-prose { font-size: 15px; }
  .khv849-prose h2 { font-size: 22px; }
  .khv849-legacy-row { grid-template-columns: minmax(0, 1fr); }
}

/* V8.4.13: preserve BOTH rows in the sticky desktop header. */
@media (min-width: 821px) {
  .topline { position: sticky !important; top: 0 !important; z-index: 121; }
  .header, body.category .header {
    position: sticky !important;
    top: 34px !important;
    z-index: 120;
  }
  body.admin-bar .topline { top: 32px !important; }
  body.admin-bar .header, body.admin-bar.category .header { top: 66px !important; }
}
@media (min-width: 783px) and (max-width: 820px) {
  body.admin-bar .header, body.admin-bar.category .header { top: 32px !important; }
}

/* Home hero: automatic category rotation, with no manual controls. */
.hero-art > img { transition: opacity .2s ease, transform .2s ease; }
.hero-art > img.khv-hero-switching { opacity: 0; transform: translateY(7px) scale(.985); }

/* V8.4.21: three compact, accessible floating contact icons on phones.
   Desktop pills, links, and all three contact channels stay unchanged. */
@media (max-width: 600px) {
  .khv848-contact-float {
    right: 10px !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 7px !important;
  }
  body.category .khv848-contact-float {
    inset: auto 10px calc(12px + env(safe-area-inset-bottom, 0px)) auto !important;
  }
  .khv848-contact-float a {
    box-sizing: border-box;
    width: 46px;
    height: 46px;
    min-width: 46px !important;
    min-height: 46px;
    padding: 5px !important;
    gap: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .khv848-contact-float a > span:nth-child(2),
  .khv848-contact-float a > span:nth-child(3) { display: none !important; }
  .khv848-contact-float .khv848-contact-symbol {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    font-size: 19px;
  }
}
