/* 工艺智造讯 — 对齐投资界 pedaily 左侧栏门户骨架 */
:root {
  --color-bg: #f5f5f2;
  --color-surface: #ffffff;
  --color-text: #353535;
  --color-muted: #888888;
  --color-accent: #165dff;
  --color-accent-soft: #f6faff;
  --color-line: #ebebeb;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    Arial, sans-serif;
  --radius: 4px;
  --sidebar-w: 136px;
  --wrap: 1120px;
  --aside-w: 300px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}

/* —— 左侧固定栏 —— */
.page-shell {
  display: flex;
  min-height: 100vh;
}

.page-l {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--color-surface);
  border-right: 1px solid var(--color-line);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 20px 0 24px;
}

.page-l .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px 20px;
}

.page-l .brand img {
  height: 36px;
  width: auto;
  max-width: 112px;
  object-fit: contain;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px;
}

.side-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border-radius: 0 8px 8px 0;
  border-left: 3px solid transparent;
  color: #333;
  font-size: 14px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.side-nav__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c8c8c8;
  flex-shrink: 0;
  transition: background 0.25s var(--ease);
}

.side-nav__link:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.side-nav__link:hover .side-nav__dot,
.side-nav__link.is-active .side-nav__dot {
  background: var(--color-accent);
}

.side-nav__link.is-active {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-left-color: var(--color-accent);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  margin: 0 16px 12px;
  border: 1px solid var(--color-line);
  background: #fff;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.page-r {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* —— 频道横条 —— */
.channel-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.channel-bar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  padding: 14px 0;
  font-size: 14px;
}

.channel-bar__inner a {
  position: relative;
  color: #555;
  padding-bottom: 4px;
  transition: color 0.25s var(--ease);
}

.channel-bar__inner a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}

.channel-bar__inner a:hover,
.channel-bar__inner a.is-active {
  color: var(--color-accent);
  font-weight: 600;
}

.channel-bar__inner a:hover::after,
.channel-bar__inner a.is-active::after {
  transform: scaleX(1);
}

/* —— 焦点大图 —— */
.hero {
  background: var(--color-bg);
  padding: 16px 0 0;
}

.hero .wrap {
  position: relative;
}

.hero__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 940 / 400;
  overflow: hidden;
  border-radius: 2px;
  background: #1a1a1a;
}

.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}

.hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.hero__slide:hover img {
  transform: scale(1.045);
}

.hero__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 28px 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  transition: padding-bottom 0.3s var(--ease);
}

.hero__slide:hover .hero__caption {
  padding-bottom: 30px;
}

.hero__caption h2 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.35;
}

.hero__dots {
  position: absolute;
  right: 20px;
  bottom: 16px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero__dot.is-active {
  background: #fff;
}

/* —— 推荐内容 —— */
.rec-block {
  padding: 28px 0 8px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-head__title::before {
  content: "";
  width: 3px;
  height: 16px;
  background: var(--color-accent);
  border-radius: 1px;
}

.section-head__more {
  font-size: 13px;
  color: var(--color-muted);
  transition: color 0.25s var(--ease);
}

.section-head__more:hover {
  color: var(--color-accent);
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.pick-item {
  display: block;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.pick-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.pick-item__thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e8e8e4;
}

.pick-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.pick-item:hover .pick-item__thumb img {
  transform: scale(1.045);
}

.pick-item__title {
  margin: 0;
  padding: 12px 12px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* —— 双栏主区 —— */
.home-grid,
.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside-w);
  gap: 24px;
  padding: 20px 0 40px;
  align-items: start;
}

.feed {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.feed-item {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-line);
  transition: background 0.25s var(--ease);
}

.feed-item:hover {
  background: #fafafa;
}

.feed-item__thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 2px;
  background: #e8e8e4;
}

.feed-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.feed-item:hover .feed-item__thumb img {
  transform: scale(1.045);
}

.feed-item__title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
}

.feed-item__summary {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-item__meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--color-muted);
}

.tag {
  color: var(--color-accent);
}

.flash-panel,
.panel {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 16px 18px 12px;
  margin-bottom: 16px;
}

.flash-panel__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.flash-panel__tag {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--color-accent);
  padding: 2px 6px;
  border-radius: 2px;
}

.flash-panel__head h3,
.panel__title {
  margin: 0;
  font-size: 16px;
}

.brief-item {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-line);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}

.brief-item:hover {
  transform: translateX(6px);
  color: var(--color-accent);
}

.brief-item__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.brief-item__time {
  font-size: 12px;
  color: var(--color-muted);
}

.hot-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-line);
  transition: color 0.25s var(--ease);
}

.hot-item:hover {
  color: var(--color-accent);
}

.hot-item__no {
  flex-shrink: 0;
  width: 18px;
  font-weight: 700;
  color: var(--color-accent);
  font-size: 14px;
}

.hot-item:nth-child(n + 4) .hot-item__no {
  color: var(--color-muted);
}

.hot-item__title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.panel-more {
  display: block;
  text-align: center;
  padding: 10px 0 4px;
  font-size: 13px;
  color: var(--color-muted);
}

.panel-more:hover {
  color: var(--color-accent);
}

/* —— 列表头 / 详情 —— */
.list-head {
  padding: 28px 0 8px;
}

.list-head h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

.list-head p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.article {
  background: var(--color-surface);
  padding: 28px 32px 36px;
  border-radius: var(--radius);
}

.article__meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.article h1 {
  margin: 0 0 20px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
}

.article__cover {
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 2px;
}

.article__cover img {
  width: 100%;
  display: block;
  transition: transform 0.45s var(--ease);
}

.article__cover:hover img {
  transform: scale(1.045);
}

.article__body {
  font-size: 16px;
  line-height: 1.85;
}

.article__body p {
  margin: 0 0 1em;
}

.panel-box {
  background: var(--color-surface);
  padding: 28px 32px;
  border-radius: var(--radius);
}

.panel-box h1 {
  margin: 0 0 16px;
  font-size: 24px;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-line);
}

.contact-list strong {
  display: block;
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.form-row {
  margin-bottom: 16px;
}

.form-row label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #555;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: 2px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 10px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
  transition: filter 0.25s var(--ease), transform 0.15s var(--ease);
}

.btn:hover {
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(1px);
}

.form-msg {
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-muted);
}

.form-msg.is-ok {
  color: #0a7a3e;
}

.form-msg.is-err {
  color: #c62828;
}

.news-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--color-muted);
}

#pager {
  padding: 16px 0 8px;
}

#pager a {
  transition: color 0.25s var(--ease);
}

#pager a:hover {
  color: var(--color-accent);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.pillar-card {
  display: block;
  background: var(--color-accent-soft);
  border: 1px solid #dbe7ff;
  padding: 16px;
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.pillar-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.pillar-card p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--color-muted);
}

.pillar-card__link {
  font-size: 12px;
  color: var(--color-accent);
}

/* —— 页脚 —— */
.site-footer {
  margin-top: auto;
  background: #2a2a2a;
  color: rgba(255, 255, 255, 0.72);
  padding: 40px 0 24px;
  font-size: 13px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo img {
  height: 32px;
  filter: brightness(1.1);
}

.footer-about p {
  margin: 12px 0 0;
  line-height: 1.7;
  max-width: 36em;
}

.footer-col__title {
  margin: 0 0 12px;
  color: #fff;
  font-size: 14px;
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col__list a:hover,
[data-friend-links] a:hover {
  color: #fff;
}

[data-friend-links] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 18px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover {
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* —— 动效入场 —— */
@keyframes rise {
  from {
    opacity: 0.01;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0.01;
  }
  to {
    opacity: 1;
  }
}

html.is-motion .hero,
html.is-motion .list-head,
html.is-motion .article,
html.is-motion .panel-box,
html.is-motion .feed .feed-item {
  animation: rise 0.62s var(--ease) both;
}

html.is-motion .rec-grid .pick-item {
  animation: fade-in 0.5s ease both;
}

html.is-motion .rec-grid .pick-item:nth-child(2) {
  animation-delay: 0.07s;
}
html.is-motion .rec-grid .pick-item:nth-child(3) {
  animation-delay: 0.14s;
}
html.is-motion .rec-grid .pick-item:nth-child(4) {
  animation-delay: 0.21s;
}

html.is-motion .feed .feed-item:nth-child(2) {
  animation-delay: 0.07s;
}
html.is-motion .feed .feed-item:nth-child(3) {
  animation-delay: 0.14s;
}
html.is-motion .feed .feed-item:nth-child(4) {
  animation-delay: 0.21s;
}

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

@media (max-width: 1100px) {
  .rec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-grid,
  .page-grid {
    grid-template-columns: 1fr;
  }
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .page-l {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 0;
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
  }
  .page-shell {
    flex-direction: column;
  }
  .page-r {
    margin-left: 0;
  }
  .page-l .brand {
    padding: 4px 12px;
  }
  .nav-toggle {
    display: inline-block;
    margin-left: auto;
  }
  .side-nav {
    display: none;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px 12px 12px;
  }
  .side-nav.is-open {
    display: flex;
  }
  .side-nav__link {
    border-left: 0;
    border-radius: 8px;
    padding: 8px 12px;
  }
  .feed-item {
    grid-template-columns: 120px minmax(0, 1fr);
    padding: 14px;
  }
  .article,
  .panel-box {
    padding: 20px 16px;
  }
  .footer-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .rec-grid {
    grid-template-columns: 1fr;
  }
  .feed-item {
    grid-template-columns: 1fr;
  }
}
