﻿/* Jiujing Academy shared interaction and accessibility layer */
:root{--site-ink:#22201d;--site-paper:#f4efe4;--site-accent:#9c2b23;--site-focus:#b33a30}
html{scroll-padding-top:84px}
body{overflow-x:clip}
img{max-width:100%;height:auto}
a,button{-webkit-tap-highlight-color:transparent}
button{touch-action:manipulation}
:where(a,button,input,select,textarea):focus-visible{outline:2px solid var(--site-focus)!important;outline-offset:3px!important}
:where(nav,footer) a[aria-current="page"]{color:var(--site-accent)!important;text-decoration-color:currentColor}
.site-scroll-progress{position:fixed;inset:0 0 auto 0;height:3px;z-index:9998;pointer-events:none;background:transparent}
.site-scroll-progress>span{display:block;width:100%;height:100%;background:linear-gradient(90deg,var(--site-accent),#d99a4e);transform:scaleX(0);transform-origin:0 50%;will-change:transform}
.site-backtop{position:fixed;right:22px;bottom:22px;z-index:90;width:46px;height:46px;border:1px solid rgba(34,32,29,.18);border-radius:50%;display:grid;place-items:center;background:rgba(250,247,239,.94);color:var(--site-ink);box-shadow:0 8px 24px rgba(34,32,29,.10);font:500 20px/1 system-ui,sans-serif;cursor:pointer;opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .25s,visibility .25s,transform .25s,background .25s,color .25s}
.site-backtop.is-visible{opacity:1;visibility:visible;transform:translateY(0)}
.site-backtop:hover{background:var(--site-ink);color:var(--site-paper)}
@media(max-width:860px){
  html{scroll-padding-top:70px}
  :where(nav,footer) a,:where(nav,footer) button,header a,header button,.langbtn,.nav-burger{min-height:44px;display:inline-flex;align-items:center;padding-left:7px;padding-right:7px}
  .site-back-link{min-height:44px!important;display:inline-flex!important;align-items:center!important;padding-top:8px!important;padding-bottom:8px!important}
  footer a{padding-top:7px;padding-bottom:7px}
  .site-backtop{right:14px;bottom:14px;width:44px;height:44px}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}
  .news-scroll-inner{transform:none!important}
}
@media print{.site-scroll-progress,.site-backtop{display:none!important}}




.site-discovery-trigger{position:fixed;right:22px;bottom:78px;z-index:90;height:46px;padding:0 15px;border:1px solid rgba(34,32,29,.18);border-radius:23px;display:flex;align-items:center;gap:7px;background:rgba(250,247,239,.96);color:var(--site-ink);box-shadow:0 8px 24px rgba(34,32,29,.10);font:500 15px/1 system-ui,sans-serif;cursor:pointer}.site-discovery-trigger span{font-size:22px}.site-discovery-trigger:hover{background:var(--site-ink);color:var(--site-paper)}
.site-discovery[hidden]{display:none}.site-discovery{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:22px}.site-discovery-backdrop{position:absolute;inset:0;background:rgba(25,22,18,.62);backdrop-filter:blur(5px)}.site-discovery-panel{position:relative;width:min(720px,100%);max-height:min(780px,calc(100vh - 44px));overflow:auto;border:1px solid rgba(34,32,29,.14);border-radius:8px;background:#faf7ef;color:var(--site-ink);box-shadow:0 30px 90px rgba(20,17,13,.3);padding:28px}.site-discovery-panel>header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}.site-discovery-panel small{letter-spacing:.18em;color:#8d6b4d}.site-discovery-panel h2{margin:5px 0 0;font:500 clamp(25px,4vw,36px)/1.2 serif}.site-discovery-close{width:44px;height:44px;border:0;background:transparent;font-size:30px;cursor:pointer;color:inherit}
.site-search{height:54px;border:1px solid rgba(34,32,29,.25);background:#fff;display:flex;align-items:center;padding:0 16px;gap:10px}.site-search span{font-size:24px}.site-search input{width:100%;border:0;outline:0;background:transparent;font:17px/1.4 system-ui,sans-serif;color:inherit}.site-search-cats{display:flex;gap:8px;overflow:auto;padding:14px 0}.site-search-cats button{min-height:38px;padding:0 14px;border:1px solid rgba(34,32,29,.2);border-radius:20px;background:transparent;white-space:nowrap;cursor:pointer}.site-search-cats button.is-active{background:var(--site-ink);color:#fff}.site-search-status{font:13px/1.4 system-ui,sans-serif;color:#806e5d;margin:2px 0 8px}
.site-search-results{display:grid;grid-template-columns:1fr 1fr;gap:8px}.site-search-result{display:grid;gap:5px;padding:15px;border:1px solid rgba(34,32,29,.12);color:inherit;text-decoration:none;background:rgba(255,255,255,.4)}.site-search-result:hover{border-color:var(--site-accent);transform:translateY(-1px)}.site-search-result span{font:12px/1 system-ui,sans-serif;color:var(--site-accent)}.site-search-result strong{font:500 18px/1.25 serif}.site-search-result p{margin:0;color:#6d6258;font:14px/1.5 system-ui,sans-serif;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.site-search-empty{grid-column:1/-1;padding:24px;text-align:center;color:#75695f}.site-discovery-panel>footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;border-top:1px solid rgba(34,32,29,.12);margin-top:18px;padding-top:18px}.site-discovery-panel>footer p{margin:0 auto 0 0}.site-discovery-panel>footer a{min-height:42px;padding:0 15px;display:inline-flex;align-items:center;border:1px solid var(--site-ink);color:inherit;text-decoration:none}.site-discovery-panel>footer a.primary{background:var(--site-accent);border-color:var(--site-accent);color:#fff}body.site-discovery-open{overflow:hidden}
@media(max-width:860px){.site-discovery-trigger{right:14px;bottom:68px;height:44px}.site-discovery{padding:0;place-items:end center}.site-discovery-panel{width:100%;max-height:92vh;border-radius:12px 12px 0 0;padding:20px}.site-search-results{grid-template-columns:1fr}.site-discovery-panel>footer{position:sticky;bottom:-20px;background:#faf7ef;padding-bottom:20px}.site-discovery-panel>footer p{display:none}}
@media print{.site-discovery-trigger,.site-discovery{display:none!important}}
