/* =====================================================================
   styles.css — CueMe.Work 门户首页的设计系统。

   **配色和控件照 imgkit（localimgkit.com）那套做**（Tailwind v4 默认色板：
   stone-50 底、white 卡片、zinc-200 边框、neutral 文字、indigo-600 主色），
   版式骨架也一样：白色吸顶栏 + 米白 hero + 工具卡片网格 + 浅色页脚。

   零外部依赖：不加载任何第三方字体、图标或脚本。
   No external requests. System fonts only.
   ===================================================================== */

/* ---------- 设计令牌 / Design tokens ---------- */
:root {
  --page:          #fafaf9;   /* stone-50 */
  --bg:            #ffffff;
  --bg-elevated:   #ffffff;
  --bg-sunken:     #f5f5f4;
  --bg-hover:      #f5f5f4;

  --heading:       #171717;   /* neutral-900 */
  --text:          #404040;   /* neutral-700 */
  --text-muted:    #525252;
  --text-faint:    #737373;

  --border:        #e4e4e7;   /* zinc-200 */
  --border-strong: #d4d4d8;   /* zinc-300 */

  --accent:        #4f39f6;   /* indigo-600 */
  --accent-hover:  #432dd7;
  --accent-soft:   #eef2ff;

  --local:         #16a34a;   /* 「本地处理」那点绿，和 imgkit 一致 */
  --local-soft:    #dcfce7;

  /* hero 那一屏自己的色：米白底 + 靛蓝→紫的渐变字，和 imgkit 同一套 */
  --hero-bg:       #faf8f5;
  --hero-ink:      #18181b;
  --hero-muted:    #52525b;
  --hero-line:     #e8e4dd;
  --hero-brand:    #4f39f6;
  --hero-brand-2:  #7c3aed;
  --hero-brand-3:  #a855f7;
  --hero-brand-soft: #eef2ff;
  --foot-bg:       rgba(255,255,255,.55);
  --foot-fg:       #525252;
  --foot-strong:   #171717;
  --foot-line:     #e4e4e7;

  --radius:        12px;
  --radius-card:   20px;
  --radius-sm:     8px;
  --radius-pill:   99px;
  --shadow:        0 1px 3px rgba(0,0,0,.10), 0 1px 2px -1px rgba(0,0,0,.10);
  --shadow-lg:     0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -4px rgba(0,0,0,.10);

  /* hero 清单里那个对勾：做成遮罩用的 SVG（颜色由 background 决定，
     暗色主题下不用再画一份）。 */
  --check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.8 12.6l4.6 4.6 9.8-10' fill='none' stroke='%23000' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page:          #0a0a0a;
    --bg:            #171717;
    --bg-elevated:   #171717;
    --bg-sunken:     #262626;
    --bg-hover:      #262626;
    --heading:       #f5f5f5;
    --text:          #d4d4d4;
    --text-muted:    #a3a3a3;
    --text-faint:    #737373;
    --border:        #2e2e2e;
    --border-strong: #404040;
    --accent:        #818cf8;
    --accent-hover:  #a5b4fc;
    --accent-soft:   #1e1b4b;
    --local:         #4ade80;
    --local-soft:    #052e16;
    --hero-bg:       #1a1917;
    --hero-ink:      #f4f4f5;
    --hero-muted:    #a1a1aa;
    --hero-line:     #2e2c29;
    --hero-brand:    #818cf8;
    --hero-brand-2:  #a78bfa;
    --hero-brand-3:  #c084fc;
    --hero-brand-soft: #221f3d;
    --foot-bg:       rgba(23,23,23,.55);
    --foot-fg:       #a3a3a3;
    --foot-strong:   #f5f5f5;
    --foot-line:     #2e2e2e;
    --shadow:        0 1px 3px rgba(0,0,0,.5), 0 1px 2px -1px rgba(0,0,0,.5);
    --shadow-lg:     0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --page:          #0a0a0a;
  --bg:            #171717;
  --bg-elevated:   #171717;
  --bg-sunken:     #262626;
  --bg-hover:      #262626;
  --heading:       #f5f5f5;
  --text:          #d4d4d4;
  --text-muted:    #a3a3a3;
  --text-faint:    #737373;
  --border:        #2e2e2e;
  --border-strong: #404040;
  --accent:        #818cf8;
  --accent-hover:  #a5b4fc;
  --accent-soft:   #1e1b4b;
  --local:         #4ade80;
  --local-soft:    #052e16;
  --hero-bg:       #1a1917;
  --hero-ink:      #f4f4f5;
  --hero-muted:    #a1a1aa;
  --hero-line:     #2e2c29;
  --hero-brand:    #818cf8;
  --hero-brand-2:  #a78bfa;
  --hero-brand-3:  #c084fc;
  --hero-brand-soft: #221f3d;
  --foot-bg:       rgba(23,23,23,.55);
  --foot-fg:       #a3a3a3;
  --foot-strong:   #f5f5f5;
  --foot-line:     #2e2e2e;
  --shadow:        0 1px 3px rgba(0,0,0,.5), 0 1px 2px -1px rgba(0,0,0,.5);
  --shadow-lg:     0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.5);
}

/* ---------- 基础 / Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--page); overflow-x: clip; }
body {
  margin: 0; color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 {
  margin: 0 0 .5em; font-weight: 700; line-height: 1.25; letter-spacing: -.02em;
  color: var(--heading);
}
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .88em; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 顶栏 ---------- */
/* 白底吸顶，和 imgkit 的顶栏同一观感：左边 logo，右边语言 + 主题两个开关。 */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.site-head__in { display: flex; align-items: center; gap: 16px; height: 62px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
  color: var(--heading); font-size: 17.5px; font-weight: 800; letter-spacing: -.02em;
}
.brand:hover { color: var(--heading); }
.brand__mark { width: 30px; height: 30px; display: block; flex: none; }
.brand__name .dot { color: var(--accent); font-weight: 700; }

.head-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* 主题开关 */
.iconbtn {
  width: 38px; height: 38px; border: 0; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; padding: 0;
  background: none; color: var(--text-muted);
  transition: background .12s, color .12s;
}
.iconbtn:hover { background: var(--bg-sunken); color: var(--heading); }
.iconbtn svg { width: 19px; height: 19px; display: block; }

/* ---------- Hero（首页第一屏，居中一栏） ---------- */
/* 这一屏刻意做得紧凑 —— 首页的主角是下面那排工具卡片。
   内容：呼吸的小徽章 → 超大标题（第二行是靛蓝→紫的渐变字）→ 副标题
   → 一行对勾清单。底色、字号走的都是 imgkit 那套量。 */
.hero {
  background: var(--hero-bg);
  border-bottom: 1px solid var(--hero-line);
  padding: 62px 0 54px; text-align: center;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px 7px 13px; margin-bottom: 22px;
  border-radius: var(--radius-pill);
  background: var(--hero-brand-soft); color: var(--hero-brand);
  font-size: 13.5px; font-weight: 700;
}
.hero__badge i {
  position: relative; width: 7px; height: 7px; border-radius: 50%;
  background: var(--hero-brand); flex: none;
}
.hero__badge i::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: var(--hero-brand); animation: hero-ping 1.9s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes hero-ping {
  0%        { transform: scale(1);   opacity: .55; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}

.hero h1 {
  font-size: clamp(32px, 4.2vw, 52px); font-weight: 800;
  line-height: 1.16; letter-spacing: -.035em;
  color: var(--hero-ink); margin: 0 auto 18px; max-width: 18em;
}
.hero h1 .gr {
  background-image: linear-gradient(96deg, var(--hero-brand), var(--hero-brand-2) 58%, var(--hero-brand-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero__sub {
  max-width: 44em; margin: 0 auto 26px; text-wrap: pretty;
  font-size: 19px; line-height: 1.75; color: var(--hero-muted);
}
.hero__sub b { color: var(--hero-ink); font-weight: 700; }

/* 对勾清单：圆底 + 遮罩画的勾（颜色跟主题走）。
   用两列网格固定成 2×2（列宽按内容自适应、整块居中）——
   之前靠 flex 折行，文案一变长/变短就会从 2+2 变成 3+1，不稳定。 */
.hero__checks {
  list-style: none; margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: repeat(2, max-content);
  justify-content: center; gap: 10px 30px;
}
.hero__checks li {
  position: relative; padding-left: 27px; text-align: left;
  font-size: 14.5px; line-height: 20px; color: var(--hero-muted);
}
.hero__checks li::before {
  content: ''; position: absolute; left: 0; top: 0;
  width: 19px; height: 19px; border-radius: 50%; background: var(--hero-brand-soft);
}
.hero__checks li::after {
  content: ''; position: absolute; left: 4.5px; top: 4.5px;
  width: 10px; height: 10px; background: var(--hero-brand);
  -webkit-mask: var(--check-mask) center / contain no-repeat;
  mask: var(--check-mask) center / contain no-repeat;
}

/* ---------- 工具卡片 ---------- */
/* 门户的主角。封面式卡片：上面一张 16:9 的大图，下面是图标 + 名称 +
   工具数小标签 + 一句话简介，底栏是域名和「访问 →」。整张卡是一个链接，
   指向对应站点（新标签页打开，门户不丢）。 */
.tools { padding: 46px 0 0; }
.grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr));
  align-items: stretch;
}

.card {
  display: flex; flex-direction: column;
  background: var(--bg-elevated); color: inherit;
  border-radius: var(--radius-card); overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .18s, transform .18s;
}
.card:hover {
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-lg); transform: translateY(-3px);
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* 封面大图 */
.card__art {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--bg-sunken);
}
.card__art img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .55s cubic-bezier(.22, .61, .36, 1);
}
.card:hover .card__art img { transform: scale(1.035); }

/* 没有图（或图挂了）时的占位：主题色渐变 + 首字母 */
.card__art.is-fallback {
  display: grid; place-items: center;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--tile, #4f39f6) 16%, var(--bg-elevated)),
    color-mix(in srgb, var(--tile, #4f39f6) 40%, var(--bg-elevated)));
}
.card__art.is-fallback::after {
  content: attr(data-initial);
  font-size: 72px; font-weight: 800; letter-spacing: -.04em;
  color: var(--tile, var(--accent)); opacity: .9;
}

/* 文字区 */
.card__body {
  display: flex; flex-direction: column; gap: 9px;
  padding: 18px 20px 16px; flex: 1;
}
.card__head { display: flex; align-items: center; gap: 11px; }
.card__ic {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--tile, var(--accent)); background: var(--tile-soft, var(--accent-soft));
}
.card__ic svg { width: 21px; height: 21px; display: block; }
.card h2 {
  margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.015em;
  color: var(--heading); min-width: 0;
}
.card__tag {
  margin-left: auto; flex: none;
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-sunken); border-radius: var(--radius-pill);
  padding: 3px 11px; font-variant-numeric: tabular-nums;
}
.card__desc {
  font-size: 15px; color: var(--text-muted); line-height: 1.65;
  text-wrap: pretty;
}
.card__foot {
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.card__url { font-family: var(--mono); font-size: 12.5px; color: var(--text-faint); }
.card__go {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--accent);
}
.card__go svg { width: 14px; height: 14px; transition: transform .18s; }
.card:hover .card__go svg { transform: translateX(3px); }

/* 网格下面那行小字 */
.page-note {
  margin: 30px auto 0; max-width: 74ch; text-align: center;
  font-size: 14px; color: var(--text-faint); line-height: 1.8;
}

/* ---------- Sitemap 页（sitemap.html） ---------- */
/* 一页列出全部工具集：面包屑 + 标题 + 一行说明 + 纵向链接列表。
   列表是从 data.js 渲染的，加工具会自动出现在这里。 */
.crumbs { font-size: 13.5px; color: var(--text-faint); margin: 26px 0 16px; }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { margin: 0 8px; opacity: .55; }

.sm-head { max-width: 680px; margin: 0 0 28px; }
.sm-head h1 { font-size: clamp(28px, 3.2vw, 38px); margin: 0 0 10px; }
.sm-head .lede {
  margin: 0; font-size: 16.5px; line-height: 1.7;
  color: var(--text-muted); text-wrap: pretty;
}

.sm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sm-item a {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-elevated); border-radius: 14px; padding: 14px 18px;
  box-shadow: var(--shadow); color: inherit;
  transition: box-shadow .15s, transform .15s;
}
.sm-item a:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); color: inherit; }
.sm-ic {
  flex: none; width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--tile, var(--accent)); background: var(--tile-soft, var(--accent-soft));
}
.sm-ic svg { width: 22px; height: 22px; display: block; }
.sm-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sm-name {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 700; color: var(--heading);
}
.sm-tag {
  font-size: 11.5px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-sunken); border-radius: var(--radius-pill); padding: 1px 9px;
}
.sm-desc {
  font-size: 13.5px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sm-url { flex: none; font-family: var(--mono); font-size: 12.5px; color: var(--text-faint); }
.sm-go { flex: none; display: grid; place-items: center; color: var(--accent); }
.sm-go svg { width: 15px; height: 15px; transition: transform .15s; }
.sm-item a:hover .sm-go svg { transform: translateX(3px); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 60px;
  background: var(--foot-bg); color: var(--foot-fg);
  border-top: 1px solid var(--border);
  padding: 42px 0 26px; font-size: 14px;
}
.foot-grid {
  display: grid; gap: 32px;
  grid-template-columns: minmax(260px, 1.1fr) minmax(220px, .9fr);
}
.foot-brand .brand { font-size: 16.5px; }
.foot-brand .brand__mark { width: 27px; height: 27px; }
.foot-brand p {
  margin: 12px 0 0; max-width: 40em; color: var(--foot-fg); line-height: 1.75;
}
.foot-col h4 {
  color: var(--foot-strong); font-size: 13px; letter-spacing: .08em;
  margin: 2px 0 14px; font-weight: 700;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: 9px; }
.foot-col a { color: var(--foot-fg); }
.foot-col a:hover { color: var(--foot-strong); }
.foot-col .muted { color: var(--text-faint); font-size: 13px; }
/* 「全部工具 →」：页脚品牌区下面那个去 sitemap 的入口（照 LocalCalKit 的写法） */
.foot-all { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent); }
.foot-all:hover { color: var(--accent-hover); }
.site-footer .bottom a { color: var(--foot-fg); }
.site-footer .bottom a:hover { color: var(--foot-strong); text-decoration: underline; }
.site-footer .bottom {
  margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--foot-line);
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  color: var(--foot-fg); font-size: 13.5px;
}
.site-footer .bottom .grow { flex: 1 1 auto; }

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-elevated); border: 0;
  color: var(--text-muted); cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-lg); font-size: 17px; padding: 0;
  opacity: 0; pointer-events: none; transition: opacity .18s, color .12s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { color: var(--accent); }

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 34px; }
  .hero__sub { font-size: 16.5px; }
  .hero__badge { margin-bottom: 18px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .site-head__in { height: 56px; }
  .brand { font-size: 16px; }
  .iconbtn { width: 34px; height: 34px; }
  .tools { padding-top: 26px; }
  .grid { gap: 16px; }
  .card__art.is-fallback::after { font-size: 56px; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .to-top { right: 12px; bottom: 12px; }
  .sm-url { display: none; }
  .sm-item a { padding: 12px 14px; gap: 11px; }
  .sm-desc {
    white-space: normal; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .hero__checks { grid-template-columns: 1fr; justify-items: center; }
}

/* 动效敏感的用户：关掉位移和缩放，保留颜色变化 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  .card:hover { transform: none; }
  .card:hover .card__art img { transform: none; }
}

@media print {
  .to-top, .site-head { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
  .hero { background: #fff; }
}
