/* ==========================================================================
   预测豆 Comadou · 白天版首页（编辑式版式）
   --------------------------------------------------------------------------
   依据《白天版网站改版》设计稿 index.html / styles.css 落地，类名统一加 lh- 前缀，
   颜色全部走 comadou-light.css 定义的浅色 token，不写死深色值。
   仅在 .light-home（html[data-theme="light"] 内的首页块）下生效。
   版本: 1.0.0 · 2026-11
   ========================================================================== */

.light-home {
  padding-top: 72px;
  background: var(--space);
  color: var(--t2);
}

.lh-shell {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* 链接默认继承（提高选择器权重，压过 comadou-light.css 的全局 a 链接色） */
.light-home a,
html[data-theme="light"] .light-home a { color: inherit; text-decoration: none; }
.light-home h1,
.light-home h2,
.light-home h3 { color: var(--t1); }
.light-home button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.light-home img,
.light-home svg { display: block; }
.light-home :focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.light-home [hidden] { display: none !important; }

/* ---------- 通用小标签 ---------- */
.lh-label {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .16em;
  line-height: 1.4;
}

/* ---------- 导语 ---------- */
.lh-intro { padding-block: 1.75rem 1.5rem; }
.lh-title {
  margin: .35rem 0 0;
  font-size: clamp(2.25rem, 10vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.18;
}
.lh-intro-copy {
  max-width: 32rem;
  margin: 1rem 0 0;
  color: var(--t3);
  font-size: .9375rem;
  line-height: 1.8;
}

/* ---------- 头条 + 近期更新 ---------- */
.lh-lead { display: grid; gap: 2rem; }

.lh-featured {
  padding-block: 1.25rem;
  border-top: 1px solid var(--t1);
  border-bottom: 1px solid var(--line);
}
.lh-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  color: var(--accent-dark);
  font-size: .8125rem;
  font-weight: 550;
}
.lh-dot {
  width: .375rem;
  height: .375rem;
  border-radius: 50%;
  background: var(--accent);
}
.lh-flag {
  margin-left: .25rem;
  padding: .05rem .35rem;
  border: 1px solid var(--line);
  color: var(--t3);
  font-family: var(--font-mono);
  font-size: .5625rem;
  letter-spacing: .12em;
}
.lh-featured h2 {
  max-width: 45rem;
  margin: 1rem 0 0;
  font-size: clamp(1.75rem, 7.6vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.38;
  text-wrap: balance;
}
.lh-featured h2 a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: color .2s cubic-bezier(.23, 1, .32, 1), text-decoration-color .2s cubic-bezier(.23, 1, .32, 1);
}
.lh-featured h2 a:hover {
  color: var(--accent-dark);
  text-decoration-color: var(--accent);
}
.lh-summary {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--t3);
  font-size: 1rem;
  line-height: 1.8;
}
.lh-featured-foot {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.lh-byline {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .75rem;
  color: var(--t4);
  font-family: var(--font-mono);
  font-size: .6875rem;
}
.lh-byline > * + * { position: relative; }
.lh-byline > * + *::before {
  content: "·";
  position: absolute;
  left: -.65rem;
}
.lh-read {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--accent-dark);
  font-size: .875rem;
  font-weight: 550;
}
.lh-read svg,
.lh-pager svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s cubic-bezier(.23, 1, .32, 1);
}
.lh-read:hover svg,
.lh-pager a:hover svg { transform: translateX(.25rem); }

.lh-recent {
  border-top: 1px solid var(--t1);
  border-bottom: 1px solid var(--line);
}
.lh-aside-head {
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.lh-aside-head h2 { margin: 0; font-size: .9375rem; font-weight: 600; }
.lh-aside-head span {
  color: var(--t4);
  font-family: var(--font-mono);
  font-size: .625rem;
  letter-spacing: .12em;
}
.lh-recent-list { display: grid; }
.lh-recent-item {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 1rem;
  align-items: start;
  gap: .75rem;
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--line-soft);
}
.lh-recent-item time {
  padding-top: .2rem;
  color: var(--t4);
  font-family: var(--font-mono);
  font-size: .6875rem;
}
.lh-recent-body { display: grid; gap: .4rem; }
.lh-recent-body strong {
  font-size: .9375rem;
  font-weight: 550;
  line-height: 1.55;
  color: var(--t1);
  transition: color .2s cubic-bezier(.23, 1, .32, 1);
}
.lh-recent-body small { color: var(--t4); font-size: .6875rem; }
.lh-recent-item > svg,
.lh-row > svg {
  width: 1rem;
  height: 1rem;
  margin-top: .25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s cubic-bezier(.23, 1, .32, 1);
}
.lh-recent-item:hover strong { color: var(--accent-dark); }
.lh-recent-item:hover > svg,
.lh-row:hover > svg { transform: translateX(.25rem); }
.lh-empty-line { padding: 1.125rem 0; color: var(--t4); font-size: .875rem; }
.lh-index-link {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent-dark);
  font-size: .8125rem;
}
.lh-index-link span { transition: transform .2s cubic-bezier(.23, 1, .32, 1); }
.lh-index-link:hover span { transform: translateY(.2rem); }

/* ---------- 头条右侧：本站最火 ---------- */
.lh-hot {
  border-top: 1px solid var(--t1);
  border-bottom: 1px solid var(--line);
}
.lh-hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.lh-hot-item {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr);
  gap: .75rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.lh-hot-item:last-child { border-bottom: 0; }
.lh-hot-rank {
  padding-top: .18rem;
  color: var(--t4);
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.lh-hot-item:nth-child(-n+3) .lh-hot-rank { color: var(--accent); }
.lh-hot-link { display: grid; gap: .35rem; }
.lh-hot-link strong {
  color: var(--t1);
  font-size: .9375rem;
  font-weight: 550;
  line-height: 1.5;
  transition: color .2s cubic-bezier(.23, 1, .32, 1);
}
.lh-hot-link small { color: var(--t4); font-size: .6875rem; }
.lh-hot-item:hover .lh-hot-link strong,
.lh-hot-link:hover strong { color: var(--accent-dark); }

/* ---------- 文章索引 ---------- */
.lh-archive { padding-top: 3.5rem; }
.lh-toolbar { display: grid; gap: 1.5rem; }
.lh-toolbar-title h2,
.lh-sec-head h2,
.lh-about h2 {
  margin: .25rem 0 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.3;
}
.lh-search {
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: .625rem;
  padding-inline: .875rem;
  border: 1px solid var(--line);
  border-radius: .375rem;
  background: var(--panel);
}
.lh-search:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
}
.lh-search > svg {
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: var(--t4);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.lh-search input {
  width: 100%;
  min-width: 0;
  min-height: 2.875rem;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--t1);
  font-size: .875rem;
}
.lh-search input::placeholder { color: var(--t4); opacity: 1; }
.lh-search kbd {
  display: none;
  padding: .05rem .35rem;
  border: 1px solid var(--line);
  border-radius: .25rem;
  background: transparent;
  color: var(--t4);
  font-family: var(--font-mono);
  font-size: .6875rem;
}

.lh-filterbar {
  margin-top: 1.5rem;
  padding-block: .875rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.lh-filters { display: flex; flex-wrap: wrap; gap: .25rem; }
.lh-filter {
  min-height: 2.75rem;
  padding-inline: .75rem;
  border-radius: .25rem;
  color: var(--t3);
  font-size: .8125rem;
  transition: color .18s cubic-bezier(.23, 1, .32, 1), transform .18s cubic-bezier(.23, 1, .32, 1);
}
.lh-filter:hover { color: var(--accent-dark); }
.lh-filter:active { transform: scale(.97); }
.lh-filter[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
}
.lh-count {
  margin: 0;
  color: var(--t4);
  font-size: .75rem;
  white-space: nowrap;
}

.lh-thead { display: none; }
.lh-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .625rem 1rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.lh-row > time {
  color: var(--t4);
  font-family: var(--font-mono);
  font-size: .75rem;
}
.lh-row-main {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  gap: .5rem;
}
.lh-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  flex-wrap: wrap;
}
.lh-views {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--t4);
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.4;
  white-space: nowrap;
}
.lh-views svg {
  width: .875rem;
  height: .875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lh-row-main strong {
  color: var(--t1);
  font-size: 1.125rem;
  font-weight: 550;
  letter-spacing: -.015em;
  line-height: 1.55;
  transition: color .2s cubic-bezier(.23, 1, .32, 1);
}
.lh-row-main small {
  color: var(--t3);
  font-size: .8125rem;
  line-height: 1.65;
}
.lh-row-cat { color: var(--t4); font-size: .75rem; }
.lh-row > svg { display: none; }
.lh-row:hover .lh-row-main strong { color: var(--accent-dark); }

.lh-empty {
  padding-block: 3.5rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.lh-empty p { margin: 0; color: var(--t1); font-size: 1.125rem; font-weight: 550; }
.lh-empty span {
  display: block;
  margin-top: .5rem;
  color: var(--t3);
  font-size: .875rem;
}
.lh-empty button {
  min-height: 2.75rem;
  margin-top: 1.25rem;
  padding-inline: 1rem;
  border: 1px solid var(--accent);
  border-radius: .25rem;
  color: var(--accent-dark);
}
.lh-empty button:hover { background: var(--accent-soft); }

.lh-pager {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--t3);
  font-size: .8125rem;
}
.lh-pager strong { color: var(--t1); font-weight: 600; }
.lh-pager a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--accent-dark);
}
.lh-pager-end { color: var(--t4); }

/* ---------- 最火 + 关于 ---------- */
.lh-discover {
  display: grid;
  gap: 3rem;
  padding-block: 4rem;
}
.lh-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--t1);
}
.lh-sec-head > span {
  color: var(--t4);
  font-family: var(--font-mono);
  font-size: .625rem;
  letter-spacing: .14em;
}
.lh-popular-list { list-style: none; margin: 0; padding: 0; }
.lh-popular-list li { border-bottom: 1px solid var(--line-soft); }
/* 整行可点：日期 / 标题 / 阅读量同属一个链接 */
.lh-popular-item {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: .625rem;
  padding-block: 1rem;
}
.lh-popular-item > span {
  padding-top: .15rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .6875rem;
}
.lh-popular-item > strong {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  color: var(--t2);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.6;
  transition: color .18s cubic-bezier(.23, 1, .32, 1);
}
.lh-popular-item:hover > strong { color: var(--accent-dark); }
.lh-popular-item > small {
  grid-column: 2;
  color: var(--t4);
  font-family: var(--font-mono);
  font-size: .625rem;
}
.lh-popular-item > small::after { content: " 阅读"; font-family: var(--font-cn); }

.lh-about {
  align-self: start;
  padding: 1.75rem;
  border-radius: .375rem;
  background: var(--panel-2);
}
.lh-about > p:not(.lh-label) {
  margin: 1rem 0 0;
  color: var(--t3);
  font-size: .9375rem;
  line-height: 1.85;
}
/* 标题即入口：整块卡片的语义出口，指向 /about/ */
.lh-about h2 a {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  color: inherit;
  transition: color .2s cubic-bezier(.23, 1, .32, 1);
}
.lh-about h2 a:hover { color: var(--accent-dark); }
.lh-about h2 a:hover .lh-about-go { text-decoration: underline; text-underline-offset: .18em; }
.lh-topics {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.lh-topics button {
  min-height: 2.75rem;
  padding-inline: .875rem;
  border: 1px solid var(--line);
  border-radius: .25rem;
  background: var(--panel);
  color: var(--t2);
  font-size: .75rem;
  transition: color .18s cubic-bezier(.23, 1, .32, 1), transform .18s cubic-bezier(.23, 1, .32, 1);
}
.lh-topics button:hover { color: var(--accent-dark); }
.lh-topics button:active { transform: scale(.97); }
.lh-about-go {
  color: var(--accent);
  font-size: .8em;
  line-height: 1;
}
.lh-about-links {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1.5rem;
}
.lh-about-links .lh-rss { margin-top: 0; }
.lh-about-link {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--accent-dark);
  font-size: .8125rem;
  font-weight: 550;
}
.lh-about-link svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s cubic-bezier(.23, 1, .32, 1);
}
.lh-about-link:hover svg { transform: translateX(.2rem); }
.lh-rss {
  min-height: 2.75rem;
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--accent-dark);
  font-size: .8125rem;
  font-weight: 550;
}
.lh-rss svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* ---------- 响应式 ---------- */
@media (min-width: 40rem) {
  .lh-shell { padding-inline: 2rem; }
  .lh-intro {
    padding-block: 3rem 2.25rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3rem;
  }
  .lh-intro-copy { margin-top: 0; padding-bottom: .25rem; text-align: right; }
  .lh-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem);
    align-items: end;
  }
  .lh-search kbd { display: inline; }
  .lh-row {
    grid-template-columns: 6rem minmax(0, 1fr) 5rem 1rem;
    align-items: start;
    gap: 1.25rem;
    padding-block: 1.375rem;
  }
  .lh-row > time { grid-column: 1; grid-row: 1; padding-top: .25rem; }
  .lh-row-main { grid-column: 2; grid-row: 1; }
  .lh-row-cat { grid-column: 3; grid-row: 1; padding-top: .25rem; }
  .lh-row > svg { display: block; grid-column: 4; grid-row: 1; margin-top: .4rem; }
  .lh-thead {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr) 5rem 1rem;
    gap: 1.25rem;
    padding-block: .75rem;
    border-bottom: 1px solid var(--t1);
    color: var(--t4);
    font-family: var(--font-mono);
    font-size: .625rem;
    letter-spacing: .08em;
  }
  .lh-popular-item {
    grid-template-columns: 2.6rem minmax(0, 1fr) auto;
    align-items: start;
    gap: .75rem;
  }
  .lh-popular-item > small { grid-column: 3; padding-top: .25rem; }
}

@media (min-width: 64rem) {
  .lh-intro { padding-block: 3.5rem 2.75rem; }
  .lh-lead { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0; }
  .lh-featured { padding: 1.75rem 2.75rem 2rem 0; }
  .lh-featured h2 { margin-top: 1.25rem; }
  .lh-summary { margin-top: 1.25rem; }
  .lh-featured-foot { margin-top: 1.75rem; }
  .lh-recent { padding-left: 2.75rem; border-left: 1px solid var(--line); }
  .lh-recent-item { padding-block: 1.05rem; }
  .lh-archive { padding-top: 5rem; }
  .lh-filterbar { margin-top: 2rem; }
  .lh-discover {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 5rem;
    padding-block: 5rem;
  }
  .lh-about { padding: 2rem; }
}

@media (min-width: 80rem) {
  .lh-featured h2 { font-size: 2.5rem; }
  .lh-recent-body strong { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .light-home *,
  .light-home *::before,
  .light-home *::after {
    animation: none !important;
    transition: none !important;
  }
}
