/* 快修图 · 用户自定义 Logo + 页头三栏居中 + 首页最新文章板块
   原主题 output.css 用 ::before/::after 把品牌文字写死成 "Miao"+"Cut"；
   页头品牌区现已整块替换为用户提供的横版 Logo，以下仅作兜底。 */
.site-brand-text{font-size:1.5rem!important;line-height:1.1;transform:none;display:inline-flex}
.site-brand-text::before,.site-brand-text::after{content:none!important}
.site-brand-mark{background-color:transparent!important}

/* 用户 Logo：横版 347x113，按高度等比缩放 */
.site-brand{display:inline-flex!important;align-items:center;flex:0 0 auto;text-decoration:none}
.kxt-brand-logo{display:block;height:58px;width:auto;aspect-ratio:347/113;object-fit:contain}
/* 深色页头下给 Logo 垫浅底，保证黑色标语可读 */
.dark .kxt-brand-logo{background:#fff;border-radius:12px;padding:2px 6px;box-sizing:content-box}

/* ---------- 页头三栏：Logo 左 / 导航居中 / 主题·语言右 ----------
   site-nav.js 把 #theme-toggle 与 .language-select 包进 #kxt-header-controls；
   三者绝对定位脱离 flex 流，导航组因此相对整个页头真正水平居中。 */
@media(min-width:1024px){
  header > div.mx-auto.flex.justify-between{
    position:relative;justify-content:center!important;
    padding-top:1.15rem!important;padding-bottom:1.15rem!important;
  }
  header > div.mx-auto.flex.justify-between > a.site-brand{
    position:absolute;left:1.25rem;top:50%;transform:translateY(-50%);
  }
  header > div.mx-auto.flex.justify-between > div.flex.items-center{
    flex:0 1 auto;min-width:0;justify-content:center;gap:1.1rem!important;
  }
  header > div.mx-auto.flex.justify-between > div.flex.items-center > nav{
    gap:1.15rem!important;font-size:13.5px;font-weight:500;
  }
  header > div.mx-auto.flex.justify-between > div.flex.items-center > nav a{
    transition:color .18s ease;white-space:nowrap;
  }
  #kxt-header-controls{
    position:absolute;right:1.25rem;top:50%;transform:translateY(-50%);
    display:flex;align-items:center;gap:1rem;
  }
  #kxt-injected-nav{
    gap:1.15rem!important;font-size:13.5px;
    border-left:1px solid rgba(120,120,140,.22);padding-left:1.15rem;
  }
  .dark #kxt-injected-nav{border-left-color:rgba(220,220,230,.2)}
}
/* 窄屏回到紧凑左右布局，避免三栏互相挤压 */
@media(max-width:1023px){
  header > div.mx-auto.flex.justify-between{position:static;justify-content:space-between!important;gap:.75rem!important;padding-top:.65rem!important;padding-bottom:.65rem!important}
  header > div.mx-auto.flex.justify-between > a.site-brand{position:static;transform:none}
  header > div.mx-auto.flex.justify-between > div.flex.items-center{flex:0 0 auto;gap:.6rem!important}
  #kxt-header-controls{position:static;transform:none;margin-left:auto;display:flex;align-items:center;gap:.6rem}
  .kxt-brand-logo{height:44px}
  #kxt-injected-nav{border-left:0;padding-left:0}
}
@media(max-width:420px){.kxt-brand-logo{height:36px}}

/* ---------- 首页「最新文章」：两列，每列 10 行 ---------- */
#kxt-latest-articles{max-width:72rem;margin:0 auto 4rem;padding:0 1.25rem}
#kxt-latest-articles .kxt-la-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1.1rem}
#kxt-latest-articles .kxt-la-head h2{font-size:1.75rem;font-weight:800;letter-spacing:-.02em;color:#111827;margin:0}
#kxt-latest-articles .kxt-la-more,#kxt-latest-articles .kxt-la-foot a{color:#6366f1;font-size:.9rem;font-weight:600;text-decoration:none;white-space:nowrap}
#kxt-latest-articles .kxt-la-more:hover,#kxt-latest-articles .kxt-la-foot a:hover{text-decoration:underline}
#kxt-latest-articles .kxt-la-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(10,auto);grid-auto-flow:column;column-gap:2.5rem;background:#fff;border:1px solid #e5e7eb;border-radius:1rem;padding:1rem 1.5rem}
#kxt-latest-articles .kxt-la-item{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-width:0;padding:.52rem 0;border-bottom:1px dashed #eef0f3;color:#374151;text-decoration:none;font-size:.9rem}
#kxt-latest-articles .kxt-la-t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#kxt-latest-articles .kxt-la-item:hover .kxt-la-t{color:#6366f1}
#kxt-latest-articles .kxt-la-m{flex:0 0 auto;color:#9ca3af;font-size:.72rem;background:#f3f4f6;border-radius:999px;padding:.12rem .5rem;white-space:nowrap}
#kxt-latest-articles .kxt-la-foot{text-align:center;margin-top:1.1rem}
@media(max-width:767px){
  #kxt-latest-articles .kxt-la-grid{grid-template-columns:1fr;grid-template-rows:none;grid-auto-flow:row;column-gap:0}
  #kxt-latest-articles .kxt-la-head h2{font-size:1.4rem}
}
.dark #kxt-latest-articles .kxt-la-head h2{color:#fafafa}
.dark #kxt-latest-articles .kxt-la-grid{background:#18181b;border-color:#27272a}
.dark #kxt-latest-articles .kxt-la-item{color:#d4d4d8;border-bottom-color:#2f2f33}
.dark #kxt-latest-articles .kxt-la-m{color:#a1a1aa;background:#27272a}

/* ---------- 页脚「网站地图」链接区 ---------- */
#kxt-sitemap-block{font-size:12px;line-height:1.6}
#kxt-sitemap-block .kxt-sm-cols{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.5rem}
#kxt-sitemap-block h3{margin:0 0 .55rem;color:#f9fafb;font-weight:600;font-size:12px}
#kxt-sitemap-block ul{list-style:none;margin:0;padding:0}
#kxt-sitemap-block li{margin:0 0 .3rem}
#kxt-sitemap-block a{color:#9ca3af;text-decoration:none;transition:color .16s ease}
#kxt-sitemap-block a:hover{color:#fff}
#kxt-sitemap-block .kxt-sm-more{color:#a5b4fc}
@media(max-width:760px){#kxt-sitemap-block .kxt-sm-cols{grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem}}

/* 窄屏：语言控件收成纯图标，避免被裁切 */
@media(max-width:640px){
  header > div.mx-auto.flex.justify-between{
    padding-left:.75rem!important;padding-right:.75rem!important;gap:.4rem!important;
  }
  header .language-select{width:2.25rem}
  header .language-select-control{grid-template-columns:1fr;padding:0;justify-items:center}
  header .language-select-label,header .language-select-chevron{display:none}
  #kxt-header-controls{gap:.4rem;flex:0 0 auto}
}
