/* 九天工具箱 · 软件大厅 */

:root{
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --r-sm: 10px;
  --r-md: 16px;
  --r-pill: 999px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

html[data-theme="light"]{
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-hover: #ffffff;
  --border: #e5e9f0;
  --border-hover: #cfd7e4;
  --border-soft: #eef1f6;
  --icon-hi: rgba(255,255,255,1);
  --icon-ring: rgba(255,255,255,.95);
  --icon-shadow: 0 2px 6px -2px rgba(16,24,40,.16);
  --text: #151d29;
  --text-dim: #5a6575;
  --text-mute: #8a94a3;
  --accent: #2f6fed;
  --accent-2: #7c5cf5;
  --accent-halo: rgba(47,111,237,.34);
  --accent-halo-2: rgba(124,92,245,.22);
  --accent-soft: #edf3ff;
  --glow-1: rgba(47,111,237,.07);
  --glow-2: rgba(124,92,245,.06);
  --shadow-1: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.05);
  --shadow-2: 0 14px 32px -14px rgba(16,24,40,.20), 0 3px 10px -4px rgba(16,24,40,.08);
  --mark-bg: #2f6fed;
  --mark-fg: #ffffff;
  --topbar-bg: rgba(245,247,250,.82);
}

html[data-theme="dark"]{
  --bg: #0a0e15;
  --surface: #121a25;
  --surface-hover: #16202d;
  --border: #1f2937;
  --border-hover: #33415a;
  --border-soft: #19222f;
  --icon-hi: rgba(255,255,255,.075);
  --icon-ring: rgba(255,255,255,.055);
  --icon-shadow: none;
  --text: #e9eef6;
  --text-dim: #9aa6b6;
  --text-mute: #697485;
  --accent: #6b9bff;
  --accent-2: #a78bfa;
  --accent-halo: rgba(120,150,255,.45);
  --accent-halo-2: rgba(167,139,250,.30);
  --accent-soft: rgba(107,155,255,.13);
  --glow-1: rgba(107,155,255,.10);
  --glow-2: rgba(139,110,255,.09);
  --shadow-1: 0 1px 2px rgba(0,0,0,.5);
  --shadow-2: 0 18px 40px -18px rgba(0,0,0,.8), 0 4px 12px -6px rgba(0,0,0,.6);
  --mark-bg: #1d2f4d;
  --mark-fg: #7ea8ff;
  --topbar-bg: rgba(10,14,21,.78);
}

*,*::before,*::after{ box-sizing: border-box; }

html{ -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58rem 30rem at 12% -12%, var(--glow-1), transparent 62%),
    radial-gradient(48rem 26rem at 92% -6%, var(--glow-2), transparent 62%);
}

.wrap{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.skip{
  position: absolute; left: -9999px;
}
.skip:focus{
  left: 16px; top: 16px; z-index: 99;
  background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

/* ---------- 顶栏 ---------- */

.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--topbar-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner{
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--r-sm);
}
.brand:focus-visible{ outline: 2px solid var(--accent); outline-offset: 4px; }

.brand__mark{
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--mark-bg);
  color: var(--mark-fg);
}
.brand__mark svg{ width: 20px; height: 20px; display: block; }

.brand__text{
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand__text strong{
  font-size: 15.5px;
  font-weight: 620;
  letter-spacing: .2px;
}
.brand__text em{
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-mute);
  letter-spacing: 1.4px;
}

.theme-toggle{
  flex: none;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.theme-toggle:hover{ color: var(--text); border-color: var(--border-hover); }
.theme-toggle:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .ico{ width: 18px; height: 18px; display: block; }
html[data-theme="light"] .ico--sun{ display: none; }
html[data-theme="dark"] .ico--moon{ display: none; }

/* ---------- 页头 ---------- */

main{ flex: 1 0 auto; padding-bottom: 64px; }

.hero{
  padding: 56px 0 44px;
  max-width: 660px;
}

.hero__title{
  margin: 0 0 16px;
  font-size: clamp(29px, 4.6vw, 42px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.9px;
}

.hero__accent{
  display: inline-block;
  color: var(--accent);
  padding: 0 .02em;
}

/* 「懂你」：蓝紫渐变字 + 间歇闪过的柔光。
   底色渐变是静止的，只有一道白光每 7 秒从左扫到右一次（走完约 1.3 秒），
   剩下 5.7 秒完全不动。要更快/更慢改 7s，要更亮改 .92 这个值。 */
@supports ((-webkit-background-clip: text) or (background-clip: text)){
  .hero__accent{
    background-image:
      linear-gradient(108deg,
        rgba(255,255,255,0) 34%,
        rgba(255,255,255,.30) 43%,
        rgba(255,255,255,.66) 50%,
        rgba(255,255,255,.30) 57%,
        rgba(255,255,255,0) 66%),
      linear-gradient(96deg,
        var(--accent) 0%,
        var(--accent-2) 48%,
        var(--accent) 100%);
    background-size: 150% 100%, 100% 100%;
    background-position: 200% 50%, 0% 50%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px var(--accent-halo))
            drop-shadow(0 10px 34px var(--accent-halo-2));
    animation: accentSweep 5s cubic-bezier(.4,0,.2,1) infinite;
  }
}

@keyframes accentSweep{
  0%   { background-position: 200% 50%, 0% 50%; }
  28%  { background-position: -100% 50%, 0% 50%; }
  100% { background-position: -100% 50%, 0% 50%; }
}

.hero__sub{
  margin: 0;
  font-size: 15.5px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* 中文字符默认可在任意字间断行。需要连读的片段（连同引号）
   包进 .nw，就当成一个不可分割的整体，换行时整块走。 */
.nw{ white-space: nowrap; }

/* ---------- 卡片网格 ---------- */

.sections{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(318px, 1fr));
  gap: 16px;
}

.card{
  position: relative;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  --c: var(--c-base, #2f6fed);
  --c-soft: var(--c-soft-base, rgba(47,111,237,.15));
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
              border-color .22s var(--ease), background .22s var(--ease);
}
html[data-theme="dark"] .card{
  --c: var(--c-base-dark, var(--c-base));
  --c-soft: var(--c-soft-dark, var(--c-soft-base));
}
.card:hover{
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-2);
  background: var(--surface-hover);
}
.card:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.card:active{ transform: translateY(0); }

.card__icon{
  width: 48px; height: 48px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 14px;
  background:
    linear-gradient(160deg, var(--icon-hi) 0%, rgba(255,255,255,0) 68%),
    var(--c-soft);
  box-shadow: inset 0 0 0 1px var(--icon-ring), var(--icon-shadow);
  color: var(--c);
}
.card__icon svg{
  width: 24px; height: 24px;
  display: block;
  stroke-width: 1.6;
}

.card__body{
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 14px;
}

.card__title{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 18px;
  font-weight: 620;
  line-height: 1.4;
  letter-spacing: -.15px;
}

.badge{
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  color: var(--c);
  background: var(--c-soft);
  white-space: nowrap;
}
.badge--muted{
  color: var(--text-mute);
  background: transparent;
  border: 1px solid var(--border);
}

.card__desc{
  font-size: 14px;
  line-height: 1.62;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__meta{
  margin-top: auto;
  padding-top: 13px;
  padding-right: 38px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-mute);
  min-width: 0;
}

.card__cat{
  flex: none;
  font-weight: 500;
  color: var(--c);
}

.card__meta .dot{
  flex: none;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--border-hover);
}

.card__metaText{
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__arrow{
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: var(--text-mute);
  opacity: .45;
  transform: translateX(0);
  transition: opacity .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
}
.card__arrow svg{ width: 15px; height: 15px; display: block; }
.card:hover .card__arrow{
  opacity: 1;
  transform: translateX(2px);
  color: var(--accent);
}

.card--soon{
  cursor: default;
  opacity: .7;
}
.card--soon:hover{
  transform: none;
  box-shadow: var(--shadow-1);
  border-color: var(--border);
  background: var(--surface);
}
.card--soon .card__arrow{ display: none; }

/* ---------- 常见问题（页面唯一的成段文字，给搜索引擎和第一次来的人） ---------- */

.faq{
  margin-top: 48px;
  padding-top: 34px;
  padding-bottom: 30px;
  border-top: 1px solid var(--border-soft);
  max-width: 800px;
}

.faq__title{
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .8px;
  color: var(--text-mute);
}

.faq__list{
  margin: 0;
}

.faq__item{
  padding: 15px 0;
  border-bottom: 1px solid var(--border-soft);
}
.faq__item:last-child{
  border-bottom: 0;
  padding-bottom: 4px;
}

.faq__q{
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
  letter-spacing: -.1px;
}

.faq__a{
  margin: 7px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dim);
}

/* ---------- 页脚 ---------- */

.footer{
  flex: none;
  border-top: 1px solid var(--border);
  padding: 22px 0;
}

.footer__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-mute);
}

.footer__stat{ font-variant-numeric: tabular-nums; }

/* 备案号（法规要求页脚展示，并链到工信部） */
.footer__beian{
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--text-mute);
}
.footer__beian a{
  color: inherit;
  text-decoration: none;
  transition: color .18s var(--ease);
}
.footer__beian a:hover{ color: var(--text-dim); }

/* ---------- 响应式 ---------- */

@media (max-width: 640px){
  .wrap{ padding: 0 18px; }
  .topbar__inner{ height: 58px; }
  .hero{ padding: 32px 0 24px; }
  .hero__sub{ font-size: 15px; }
  .sections{ grid-template-columns: 1fr; gap: 12px; }
  .card{ padding: 18px; gap: 14px; }
  .card__icon{ width: 44px; height: 44px; border-radius: 12px; }
  .card__body{ padding-right: 0; }
  .card__arrow{ display: none; }
  .faq{ margin-top: 34px; padding-top: 28px; }
  .faq__item{ padding: 14px 0; }
  .faq__q{ font-size: 15.5px; }
  .faq__a{ font-size: 14.5px; line-height: 1.78; }
  .faq{ padding-bottom: 22px; }
  .footer{ padding: 18px 0; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; }
  .card:hover{ transform: none; }
}
