/* SIM 9.8.1 R3: header aligned to nam-sinh (GitHub main); account CSS is shared /pts-assets/tool-access.css. */
.site-header{position:relative;z-index:120;background:rgba(7,27,21,.96);border-bottom:1px solid rgba(198,219,176,.17)}
.site-header .header-inner{width:min(1320px,calc(100% - 48px));min-height:76px;height:auto;padding:10px 0;display:flex;align-items:center;justify-content:space-between;gap:clamp(12px,2vw,26px);overflow:visible}
.site-header .brand{flex:0 1 auto;min-width:0;display:flex;align-items:center;gap:12px;font-size:inherit;letter-spacing:normal;text-decoration:none;white-space:nowrap;color:#f5e4b2}
.site-header .brand .pts-brand-logo{display:block;width:56px;height:56px;object-fit:contain;flex:0 0 auto}
.site-header .brand>span{display:flex;flex-direction:column;min-width:0}
.site-header .brand strong{font-size:20px;font-weight:800;letter-spacing:-.025em;line-height:1.3;color:#f5e4b2}
.site-header .brand .brand-tld{color:#7fe1b4}
.site-header .brand small{font-size:10px;letter-spacing:.02em;font-weight:450;color:#bed6c8;line-height:1.3;margin:1px 0 0}
.site-header .site-nav{display:flex;align-items:center;justify-content:center;flex:1 1 auto;gap:5px;color:#d4e9db;min-width:0}
.site-header .site-nav a{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:42px;white-space:nowrap;padding:10px 14px;border-radius:9px;color:#d4e9db;text-decoration:none;font-weight:650;font-size:13px;line-height:1.3}
.site-header .site-nav a:hover,.site-header .site-nav a:focus-visible{background:#234b38;color:#fff}
.site-header .site-nav a[aria-current="page"]{background:#d9ba74;color:#173326;box-shadow:inset 0 -1px rgba(70,43,20,.18)}
.site-header .site-nav a[aria-current="page"]:after{display:none}
/* The following selectors position ONLY the official GitHub shared member component. */
.site-header>.container>.pts-account-slot{flex:0 1 auto;margin-left:auto;align-self:center;min-width:0;z-index:150}
.site-header .pts-account-details{z-index:151}
.site-header .pts-account-dropdown{z-index:500;top:calc(100% + 9px)}
/* Do not style children of .pts-account-slot globally: dropdown CSS comes from the production shared stylesheet. */
@media(max-width:1170px){
 .site-header .header-inner{flex-wrap:wrap;gap:8px 20px}
 .site-header .site-nav{flex:0 0 100%;order:3;justify-content:center;gap:8px;border-top:1px solid #ffffff18;padding-top:9px}
 .site-header>.container>.pts-account-slot{order:2;margin-left:auto}
}
@media(max-width:700px){
 .site-header .header-inner{width:calc(100% - 30px);gap:8px 12px}
 .site-header .brand{gap:7px}
 .site-header .brand .pts-brand-logo{width:44px;height:44px}
 .site-header .brand strong{font-size:16px}
 .site-header .brand small{font-size:8px}
 .site-header .site-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
 .site-header .site-nav a{min-width:0;min-height:40px;text-align:center;white-space:normal;padding:8px 3px;font-size:11px}
 .site-header>.container>.pts-account-slot{width:auto;max-width:calc(100% - 182px);justify-content:flex-end}
 .site-header .pts-identity{max-width:118px}
}
@media(max-width:440px){
 .site-header .brand small{display:none}
 .site-header .brand strong{font-size:14px}
 .site-header .brand .pts-brand-logo{width:38px;height:38px}
 .site-header>.container>.pts-account-slot{max-width:calc(100% - 145px)}
 .site-header .pts-identity{max-width:85px}
 .site-header .pts-account-slot .pts-upgrade{display:none}
 .site-header .site-nav a{font-size:10px}
}

/* R3 contrast fix TARGETS ACTUAL LIGHT-PAPER CLASSES in v8: luoshu-pair-panel, luoshu-pair. */
.tp-appendix-body .luoshu-pair-panel{background:#faf5e9!important;border:1px solid #d6c79f!important;border-radius:15px;color:#23392e!important;box-shadow:0 6px 15px rgba(0,0,0,.13)}
.tp-appendix-body .luoshu-pair-panel h3{color:#153b2b!important;font-weight:800;font-size:18px}
.tp-appendix-body .luoshu-pairs{gap:10px}
.tp-appendix-body .luoshu-pair{background:#fffefb!important;color:#233d31!important;border:1px solid #cbd9ce!important;padding:13px 12px!important;box-shadow:0 1px 3px rgba(20,51,32,.07)}
.tp-appendix-body .luoshu-pair strong{color:#15422f!important;font-size:23px;line-height:1.25;font-weight:800}
.tp-appendix-body .luoshu-pair span{color:#274b3a!important;font-size:12.5px;font-weight:750}
.tp-appendix-body .luoshu-pair small{color:#51685a!important;font-size:11.5px;line-height:1.55;opacity:1!important}
.tp-appendix-body .luoshu-pair.control{border-color:#d99a83!important}
.tp-appendix-body .luoshu-pair.control span{color:#9e3726!important}
.tp-appendix-body .luoshu-pair.unclassified{border-color:#b9bfbb!important}
.tp-appendix-body .luoshu-pair.unclassified span{color:#45554c!important}
.tp-appendix-body .luoshu-pair-panel>.fine{color:#50675a!important;font-size:11.5px;line-height:1.65;opacity:1!important}
.tp-appendix-body .luoshu-pair-panel a{color:#165c48!important;text-decoration:underline}
/* Keep generic appendix dark, but never apply white text to the paper subtree. */
.tp-appendix-body{background:linear-gradient(180deg,#0d241c,#102c23);padding:12px 16px 20px;border-top:1px solid #355746}
.tp-appendix-body .panel,.tp-appendix-body .reading-card{max-width:100%;overflow-wrap:anywhere}
.tp-appendix-body .luoshu-pair-panel :is(h3,p,span,strong,small){opacity:1}
@media(max-width:560px){
 .tp-appendix-body{padding:10px 9px 14px}
 .tp-appendix-body .luoshu-pair-panel{padding:14px 10px}
 .tp-appendix-body .luoshu-pairs{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .tp-appendix-body .luoshu-pair{padding:11px 9px!important}
 .tp-appendix-body .luoshu-pair strong{font-size:20px}
}
:where(a,button,input,select,summary):focus-visible{outline:3px solid #f1ca7d;outline-offset:3px}
#main,#about,#report{scroll-margin-top:24px}
.report-column{min-width:0;overflow-wrap:anywhere}
.report-column table{display:block;max-width:100%;overflow-x:auto}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
@media print{.site-header{display:none!important}.tp-appendix-body .luoshu-pair-panel,.tp-appendix-body .luoshu-pair{background:white!important;color:#182a1f!important;border-color:#bdc6bd!important}}

/* Ô số điện thoại: báo đỏ khi sai đầu số / thiếu số, viền xanh khi đủ 10 số hợp lệ */
.phone-input.is-invalid,.phone-input.is-invalid:focus{border-color:#e0675a!important;color:#ffb4a8;box-shadow:0 0 0 3px #e0675a33!important}
.phone-input.is-valid{border-color:#6fbf8a}
#phone-help.is-error{color:#ff9d8f;font-weight:600}
