/* ==========================================================================
   Token Club · 词元俱乐部  v1
   --------------------------------------------------------------------------
   设计语言：暖米纸 · 赤陶橘 · 蜂蜜琥珀 · 苔藓绿
   刻意避开 AI 常见的黑蓝紫（#0A0E27 / #4C1D95 / #3B82F6 之类），
   走"编辑杂志 + 手工作坊"的路子——纸张感、颗粒感、暖灰、亮橘点睛。
   ========================================================================== */

:root {
  /* 底色：纸感米白，不是纯白，长时间阅读不刺眼 */
  --bg:              #FAF6EF;
  --bg-alt:          #F3EDE1;
  --surface:         #FFFFFF;
  --surface-sunken:  #F7F1E5;

  /* 文字：暖近黑，比 #000 温柔 */
  --ink:             #1E1A15;
  --ink-2:           #4A4239;
  --muted:           #8B7F71;
  --faint:           #B5A998;

  /* 边线：暖米灰 */
  --line:            #E4DCCB;
  --line-strong:     #CFC3AC;

  /* 主色：赤陶橘（rust / terracotta），CTA 用它 */
  --primary:         #D9532C;
  --primary-dark:    #B4401E;
  --primary-soft:    #FCEDE6;
  --primary-tint:    #F9D9CB;

  /* 强调：蜂蜜琥珀，用于徽章/积分/热门标记 */
  --accent:          #E9A93B;
  --accent-dark:     #B87F1C;
  --accent-soft:     #FDF3DE;

  /* 辅助色（避开蓝紫，全部走大地色系） */
  --moss:            #3F8A5F;   /* 苔藓绿 · 通过/成功 */
  --moss-soft:       #E6F1E9;
  --brick:           #C24343;   /* 砖红 · 危险/驳回 */
  --brick-soft:      #FBEAEA;
  --dusty-teal:      #4C7C8C;   /* 灰青 · 信息（这是全站唯一的冷色，且已去饱和） */
  --dusty-teal-soft: #E4EEF1;
  --clay:            #A66A3E;   /* 陶土棕 · 工作流标签 */
  --clay-soft:       #F5E7D8;

  /* 阴影：暖色阴影，不用冷灰 */
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, .06);
  --shadow-md: 0 4px 14px rgba(60, 40, 20, .08);
  --shadow-lg: 0 12px 32px rgba(60, 40, 20, .12);
  --shadow-glow: 0 0 0 3px rgba(217, 83, 44, .18);

  /* 圆角：小圆角，避免"AI 卡片风"的大圆角 */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  /* 字号 */
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 14px;
  --fs-md: 15px;
  --fs-lg: 17px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  --fs-3xl: 34px;

  /* 布局 */
  --container: 1240px;
  --header-h: 62px;

  /* 字体：系统字栈 + 手写感的中文优先 */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI",
               "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-serif: "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC", Georgia, serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, "Courier New", monospace;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--ink);
  background-color: var(--bg);
  /* 极淡的纸纹（SVG 内联，颗粒感） */
  background-image:
    radial-gradient(rgba(180, 160, 130, .05) 1px, transparent 1px),
    radial-gradient(rgba(180, 160, 130, .04) 1px, transparent 1px);
  background-size: 24px 24px, 40px 40px;
  background-position: 0 0, 12px 12px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1,h2,h3,h4,h5 { font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: var(--fs-3xl); line-height: 1.25; }
h2 { font-size: var(--fs-2xl); line-height: 1.3; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
p  { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--font-mono); font-size: .92em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* --------------------------------------------------------------------------
   Header · 顶栏（暖纸底 + 主色 logo）
   -------------------------------------------------------------------------- */
.tc-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 246, 239, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.tc-header__inner {
  max-width: var(--container); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 28px; height: 100%;
}
.tc-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 700; color: var(--ink);
  letter-spacing: .02em;
}
.tc-logo:hover { text-decoration: none; color: var(--primary-dark); }
.tc-logo__mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-mono); font-size: 15px; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.tc-logo__mark::after { content: "词"; }
.tc-logo__sub { font-size: 11px; color: var(--muted); font-family: var(--font-sans); font-weight: 400; letter-spacing: .12em; text-transform: uppercase; }

.tc-nav { display: flex; gap: 4px; flex: 1; }
.tc-nav a {
  padding: 8px 14px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: var(--fs-md); font-weight: 500;
  transition: background .15s, color .15s;
}
.tc-nav a:hover { background: var(--surface-sunken); color: var(--ink); text-decoration: none; }
.tc-nav a.is-active {
  background: var(--primary-soft); color: var(--primary-dark);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.tc-search {
  position: relative; width: 260px;
}
.tc-search input {
  width: 100%; padding: 8px 14px 8px 34px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; font-size: var(--fs-sm);
  transition: border-color .15s, box-shadow .15s;
}
.tc-search input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.tc-search::before {
  content: ""; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  background: no-repeat center / contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B7F71' stroke-width='2.5' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>");
}

.tc-user { display: flex; align-items: center; gap: 10px; }
.tc-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
  border: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Buttons · 按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: var(--fs-md); font-weight: 500; cursor: pointer;
  transition: transform .06s, box-shadow .15s, background .15s, color .15s, border-color .15s;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--primary); color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--primary-dark); color: #fff; text-decoration: none; box-shadow: var(--shadow-md); }
.btn--ghost {
  background: transparent; color: var(--ink-2); border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--surface-sunken); color: var(--ink); border-color: var(--muted); text-decoration: none; }
.btn--soft {
  background: var(--primary-soft); color: var(--primary-dark);
}
.btn--soft:hover { background: var(--primary-tint); text-decoration: none; }
.btn--sm { padding: 5px 12px; font-size: var(--fs-sm); }
.btn--lg { padding: 12px 28px; font-size: var(--fs-md); }

/* --------------------------------------------------------------------------
   Tags · 标签
   -------------------------------------------------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 500;
  background: var(--bg-alt); color: var(--ink-2);
  border: 1px solid var(--line);
  transition: all .15s;
}
.tag:hover { border-color: var(--line-strong); color: var(--ink); text-decoration: none; }
.tag--clay  { background: var(--clay-soft);       color: var(--clay);         border-color: transparent; }
.tag--amber { background: var(--accent-soft);     color: var(--accent-dark);  border-color: transparent; }
.tag--moss  { background: var(--moss-soft);       color: var(--moss);         border-color: transparent; }
.tag--brick { background: var(--brick-soft);      color: var(--brick);        border-color: transparent; }
.tag--teal  { background: var(--dusty-teal-soft); color: var(--dusty-teal);   border-color: transparent; }
.tag--outline { background: transparent; }

/* 状态徽章 */
.status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--r-xs);
  font-size: var(--fs-xs); font-weight: 500;
}
.status--draft     { background: var(--bg-alt); color: var(--muted); }
.status--pending   { background: var(--accent-soft); color: var(--accent-dark); }
.status--published { background: var(--moss-soft); color: var(--moss); }
.status--rejected  { background: var(--brick-soft); color: var(--brick); }
.status--hidden    { background: var(--surface-sunken); color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Cards · 内容卡片（列表用）
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s, border-color .18s;
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card__cover {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--surface-sunken), var(--bg-alt));
  position: relative; overflow: hidden;
}
.card__cover img,
.card__cover video {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .2s;
}
.card__cover .cover-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 42px;
  color: var(--line-strong);
}
.card__type-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 9px; border-radius: var(--r-xs);
  background: rgba(30, 26, 21, .78); color: #FAF6EF;
  font-size: 11px; font-weight: 500; letter-spacing: .05em;
  backdrop-filter: blur(4px);
}
.card__vram {
  position: absolute; bottom: 10px; right: 10px;
  padding: 3px 8px; border-radius: var(--r-xs);
  background: rgba(250, 246, 239, .92); color: var(--clay);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  border: 1px solid var(--line);
}
.card__body { padding: 14px 16px 16px; }
.card__title {
  font-size: var(--fs-lg); font-weight: 600; line-height: 1.4;
  margin: 0 0 6px; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__title a { color: inherit; }
.card__title a:hover { color: var(--primary-dark); text-decoration: none; }
.card__summary {
  font-size: var(--fs-sm); color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.card__meta {
  display: flex; align-items: center; gap: 12px;
  font-size: var(--fs-xs); color: var(--muted);
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.card__meta .author { color: var(--ink-2); font-weight: 500; }
.card__meta .stat { display: inline-flex; align-items: center; gap: 3px; }
.card__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }

/* --------------------------------------------------------------------------
   Grid · 布局
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--2col  { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) { .grid--2col { grid-template-columns: 1fr; } }

.section { margin: 32px 0; }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.section__title {
  font-size: var(--fs-xl); font-weight: 600; margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.section__title::before {
  content: ""; display: inline-block;
  width: 4px; height: 18px; background: var(--primary);
  border-radius: 2px;
}
.section__more { font-size: var(--fs-sm); color: var(--muted); }
.section__more:hover { color: var(--primary); }

/* --------------------------------------------------------------------------
   Hero · 首页顶部横幅
   -------------------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(ellipse at top left, var(--primary-soft) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, var(--accent-soft) 0%, transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px 44px;
  margin: 24px 0 32px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, var(--primary-tint) 0%, transparent 70%);
  opacity: .6;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); color: var(--primary-dark);
  background: var(--surface); padding: 4px 12px;
  border-radius: 999px; border: 1px solid var(--primary-tint);
  margin-bottom: 16px; letter-spacing: .04em;
}
.hero__eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.hero__title {
  font-family: var(--font-serif);
  font-size: 42px; line-height: 1.2; margin: 0 0 12px;
  color: var(--ink); position: relative;
}
.hero__title em {
  font-style: normal; color: var(--primary);
  background: linear-gradient(transparent 65%, var(--accent-soft) 65%);
  padding: 0 4px;
}
.hero__sub {
  font-size: var(--fs-md); color: var(--ink-2);
  max-width: 620px; line-height: 1.7; margin-bottom: 24px;
}
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__stats {
  display: flex; gap: 32px; margin-top: 28px;
  padding-top: 24px; border-top: 1px dashed var(--line);
  position: relative;
}
.hero__stat-num {
  font-family: var(--font-mono); font-size: 24px; font-weight: 700;
  color: var(--primary-dark); letter-spacing: -.02em;
}
.hero__stat-label { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }

/* --------------------------------------------------------------------------
   Filter bar · 筛选栏（工作流列表）
   -------------------------------------------------------------------------- */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center;
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group__label { font-size: var(--fs-xs); color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
  font-size: var(--fs-sm); cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--primary-tint); color: var(--primary-dark); }
.chip.is-active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Workflow Modal · 工作流详情弹窗（核心）
   -------------------------------------------------------------------------- */
.wf-modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(30, 26, 21, .55);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .18s ease;
}
.wf-modal-mask.is-open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.wf-modal {
  width: min(1280px, 100%); max-height: calc(100vh - 48px);
  background: var(--bg);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto;
  animation: riseUp .22s cubic-bezier(.2,.7,.3,1);
}
@keyframes riseUp { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.wf-modal__header {
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
}
.wf-modal__title { font-size: var(--fs-xl); font-weight: 600; margin: 0; flex: 1; }
.wf-modal__close {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; font-size: 18px; color: var(--muted);
  display: grid; place-items: center;
  transition: all .15s;
}
.wf-modal__close:hover { background: var(--brick-soft); color: var(--brick); border-color: var(--brick); }

.wf-modal__body {
  display: grid; grid-template-columns: 55% 45%;
  overflow: hidden;
  min-height: 0;
}
@media (max-width: 960px) {
  .wf-modal__body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
}

.wf-modal__preview {
  background: #1E1A15;
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
}
.wf-modal__video {
  width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: var(--r-sm);
  overflow: hidden; position: relative;
}
.wf-modal__video video,
.wf-modal__video img { width: 100%; height: 100%; object-fit: contain; }
.wf-modal__video .video-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--faint); font-size: var(--fs-sm);
}

.wf-params {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.wf-param {
  background: rgba(250, 246, 239, .06);
  border: 1px solid rgba(250, 246, 239, .1);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  color: #F3EDE1;
}
.wf-param__label { font-size: 11px; color: var(--faint); letter-spacing: .05em; text-transform: uppercase; }
.wf-param__value { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--accent); margin-top: 2px; }

.wf-modal__info {
  background: var(--bg);
  display: flex; flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line);
}
.wf-tabs {
  display: flex; padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  gap: 4px; overflow-x: auto;
}
.wf-tab {
  padding: 12px 16px;
  font-size: var(--fs-md); color: var(--muted);
  border: none; background: transparent; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .15s; white-space: nowrap;
}
.wf-tab:hover { color: var(--ink); }
.wf-tab.is-active {
  color: var(--primary-dark); border-bottom-color: var(--primary);
  font-weight: 500;
}
.wf-panel {
  flex: 1; overflow-y: auto; padding: 20px;
  min-height: 0;
}
.wf-panel[hidden] { display: none; }

/* 代码块（工作流 JSON） */
.code-block {
  background: #1E1A15; color: #F3EDE1;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid #2E2820;
}
.code-block__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: #2A241C;
  border-bottom: 1px solid #3A3226;
  font-size: var(--fs-xs); color: var(--faint);
}
.code-block__body {
  padding: 14px; overflow: auto; max-height: 420px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
  white-space: pre;
  counter-reset: line;
}
.code-block__body::-webkit-scrollbar { width: 8px; height: 8px; }
.code-block__body::-webkit-scrollbar-thumb { background: #3A3226; border-radius: 4px; }
.code-block__body::-webkit-scrollbar-thumb:hover { background: #4A4239; }

/* 依赖清单表 */
.dep-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.dep-table th, .dep-table td {
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid var(--line);
}
.dep-table th {
  font-weight: 500; color: var(--muted); font-size: var(--fs-xs);
  background: var(--surface-sunken);
  letter-spacing: .05em; text-transform: uppercase;
}
.dep-table tr:hover td { background: var(--surface-sunken); }
.dep-kind {
  display: inline-block; padding: 2px 8px; border-radius: var(--r-xs);
  font-size: 11px; font-family: var(--font-mono); font-weight: 600;
}
.dep-kind--node     { background: var(--clay-soft); color: var(--clay); }
.dep-kind--model    { background: var(--accent-soft); color: var(--accent-dark); }
.dep-kind--software { background: var(--dusty-teal-soft); color: var(--dusty-teal); }
.dep-path {
  font-family: var(--font-mono); font-size: 11.5px;
  background: var(--surface-sunken); padding: 2px 6px;
  border-radius: var(--r-xs); color: var(--ink-2);
}

/* 弹窗底部操作条 */
.wf-modal__footer {
  padding: 14px 24px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.wf-modal__footer .spacer { flex: 1; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font-size: var(--fs-sm); cursor: pointer;
  transition: all .15s;
}
.icon-btn:hover {
  background: var(--surface-sunken); border-color: var(--line-strong);
  color: var(--ink);
}
.icon-btn.is-active {
  background: var(--primary-soft); border-color: var(--primary-tint);
  color: var(--primary-dark);
}
.icon-btn .count { font-family: var(--font-mono); font-weight: 600; }

/* --------------------------------------------------------------------------
   Article · 内容详情
   -------------------------------------------------------------------------- */
.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 40px 48px;
}
.article__head { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px dashed var(--line); }
.article__title { font-family: var(--font-serif); font-size: 32px; margin: 0 0 12px; line-height: 1.3; }
.article__meta { display: flex; gap: 16px; color: var(--muted); font-size: var(--fs-sm); align-items: center; }
.article__body { font-size: 15.5px; line-height: 1.85; color: var(--ink-2); }
.article__body h1, .article__body h2, .article__body h3 { color: var(--ink); margin: 1.6em 0 .6em; }
.article__body h2 { border-left: 3px solid var(--primary); padding-left: 12px; }
.article__body code {
  background: var(--surface-sunken); padding: 2px 6px;
  border-radius: var(--r-xs); color: var(--primary-dark);
  font-size: .88em;
}
.article__body pre {
  background: #1E1A15; color: #F3EDE1; padding: 16px;
  border-radius: var(--r-sm); overflow: auto;
}
.article__body blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 18px; margin: 1em 0;
  color: var(--ink-2); border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* --------------------------------------------------------------------------
   Comments · 评论盖楼
   -------------------------------------------------------------------------- */
.comment-list { margin-top: 24px; }
.comment {
  padding: 14px 0; border-bottom: 1px solid var(--line);
  display: flex; gap: 12px;
}
.comment__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
  flex-shrink: 0; border: 1px solid var(--line);
}
.comment__main { flex: 1; min-width: 0; }
.comment__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: var(--fs-sm); }
.comment__author { font-weight: 600; color: var(--ink); }
.comment__floor {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted); background: var(--surface-sunken);
  padding: 1px 6px; border-radius: var(--r-xs);
}
.comment__time { color: var(--muted); font-size: var(--fs-xs); }
.comment__body { color: var(--ink-2); font-size: var(--fs-md); line-height: 1.7; }
.comment__actions { display: flex; gap: 12px; margin-top: 6px; font-size: var(--fs-xs); color: var(--muted); }
.comment__actions a { color: inherit; cursor: pointer; }
.comment__actions a:hover { color: var(--primary); text-decoration: none; }
.comment__replies {
  margin-top: 10px; padding: 10px 14px;
  background: var(--surface-sunken);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--line-strong);
}
.comment__replies .comment { padding: 8px 0; border-bottom-color: var(--line); }

/* --------------------------------------------------------------------------
   Forms · 表单
   -------------------------------------------------------------------------- */
.form-row { margin-bottom: 18px; }
.form-label {
  display: block; font-size: var(--fs-sm); font-weight: 500;
  color: var(--ink-2); margin-bottom: 6px;
}
.form-label .req { color: var(--primary); margin-left: 2px; }
.form-control {
  width: 100%; padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); font-size: var(--fs-md);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
textarea.form-control { min-height: 120px; resize: vertical; line-height: 1.6; font-family: inherit; }
.form-hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }

/* Auth 页面 */
.auth-wrap {
  min-height: calc(100vh - var(--header-h));
  display: grid; place-items: center; padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 36px 32px;
  box-shadow: var(--shadow-md);
}
.auth-card__title { font-family: var(--font-serif); font-size: 26px; margin: 0 0 6px; text-align: center; }
.auth-card__sub { text-align: center; color: var(--muted); font-size: var(--fs-sm); margin-bottom: 24px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.tc-footer {
  margin-top: 60px; padding: 32px 0 24px;
  background: var(--surface-sunken);
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: var(--fs-sm);
}
.tc-footer__inner {
  max-width: var(--container); margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.tc-footer a { color: var(--ink-2); }
.tc-footer a:hover { color: var(--primary); }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary-dark); }
.text-mono { font-family: var(--font-mono); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .flex-1 { flex: 1; } .items-center { align-items: center; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.hidden { display: none !important; }

/* 滚动条（Webkit） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 5px; border: 2px solid var(--bg-alt); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* 选中文字：橘色底 */
::selection { background: var(--primary-tint); color: var(--primary-dark); }
