/* ============ 新闻卡片（通用） ============ */

.nlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.ncard {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  overflow: hidden;
  transition: border-color 0.4s, transform 0.45s var(--ease-out);
}

.ncard:hover {
  border-color: var(--gold);
  box-shadow: 0 18px 40px -22px var(--gold-soft);
  transform: translateY(-4px);
}

.ncard__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2);
  flex-shrink: 0;
}

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

.ncard:hover .ncard__cover img {
  transform: scale(1.06);
}

.ncard__body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 11px;
}

.ncard__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-4);
  letter-spacing: 0.06em;
}

.ncard__cat {
  color: var(--acc);
  border: 1px solid var(--acc-line);
  border-radius: 4px;
  padding: 1px 7px;
}

.ncard h3 {
  font-size: 17.5px;
  line-height: 1.45;
  letter-spacing: -0.022em;
  transition: color 0.3s;
}

.ncard:hover h3 {
  color: var(--gold);
}

.ncard p {
  font-size: 13.5px;
  color: var(--fg-3);
  line-height: 1.78;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ncard__foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fg-4);
  border-top: 1px solid var(--line);
}

.ncard__pin {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--acc);
  color: #eaf2ff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 5px;
}

/* 无封面时的生成式图形 */
.ncard__gen {
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 120% at 20% 10%, #dfe7f1, #eef2f8);
}

.ncard__gen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(70% 70% at 30% 40%, #000, transparent);
}

.ncard__gen span {
  position: absolute;
  right: 18px;
  bottom: 14px;
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 300;
  color: rgba(43,95,166,0.16);
  letter-spacing: -0.04em;
}

/* ============ 首页新闻区：一大 + 列表 ============ */

.nfeat {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.nfeat .ncard--big .ncard__cover {
  aspect-ratio: 16 / 10;
}

.nfeat .ncard--big h3 {
  font-size: clamp(20px, 2.3vw, 26px);
}

.nrows {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  align-content: start;
}

.nrow {
  background: var(--bg-1);
  padding: 20px 22px;
  display: grid;
  gap: 8px;
  transition: background 0.35s, padding-left 0.4s var(--ease-out);
}

.nrow:hover {
  background: var(--bg-2);
  padding-left: 30px;
}

.nrow h4 {
  font-size: 15.5px;
  line-height: 1.5;
  transition: color 0.3s;
}

.nrow:hover h4 {
  color: var(--gold);
}

@media (max-width: 900px) {
  .nfeat {
    grid-template-columns: 1fr;
  }
}

/* ============ 新闻列表页 ============ */

.phead {
  padding-block: 132px clamp(40px, 5vw, 64px);
  position: relative;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(80% 150% at 78% -10%, rgba(43, 95, 166, 0.08), transparent 60%), var(--bg);
}

.phead h1 {
  font-size: clamp(34px, 5.4vw, 62px);
  letter-spacing: -0.04em;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-block: 28px 0;
}

.fchip {
  padding: 7px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-2);
  cursor: pointer;
  background: transparent;
  transition: all 0.3s;
  white-space: nowrap;
}

.fchip:hover {
  border-color: var(--acc-line);
  color: var(--fg);
}

.fchip.on {
  background: var(--acc);
  border-color: var(--acc);
  color: #eaf2ff;
  font-weight: 600;
}

.search {
  margin-left: auto;
  position: relative;
  min-width: 220px;
}

.search input {
  width: 100%;
  padding: 9px 15px 9px 38px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-1);
  font-size: 13.5px;
  transition: border-color 0.3s;
}

.search input:focus {
  outline: none;
  border-color: var(--acc-line);
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-4);
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 52px;
  flex-wrap: wrap;
}

.pager button {
  min-width: 38px;
  height: 38px;
  padding-inline: 12px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: transparent;
  color: var(--fg-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.3s;
}

.pager button:hover:not(:disabled) {
  border-color: var(--acc-line);
  color: var(--acc);
}

.pager button.on {
  background: var(--acc);
  border-color: var(--acc);
  color: #eaf2ff;
  font-weight: 600;
}

.pager button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* 空状态 */
.empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--fg-3);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
}

.empty svg {
  margin: 0 auto 18px;
  color: var(--fg-4);
}

.empty b {
  display: block;
  color: var(--fg-2);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 7px;
}

/* ============ 文章详情 ============ */

.post__head {
  padding-block: 122px clamp(26px, 3.4vw, 40px);
  border-bottom: 1px solid var(--line);
  position: relative;
  background:
    radial-gradient(80% 150% at 78% -10%, rgba(43,95,166,0.08), transparent 60%),
    var(--bg);
}

.post__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-3);
  margin-bottom: 22px;
  transition: color 0.3s;
}

.post__back:hover {
  color: var(--acc);
}

.post__title {
  font-size: clamp(27px, 4.4vw, 46px);
  line-height: 1.26;
  letter-spacing: -0.036em;
  max-width: 20ch;
  margin-top: 16px;
  text-wrap: balance;
}

.post__head .art__meta {
  margin-bottom: 0;
}

.article__main {
  min-width: 0;
}

.rel__t {
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.03em;
  margin-bottom: 26px;
  padding-left: 16px;
  position: relative;
}

.rel__t::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 3px;
  height: 1.05em;
  background: var(--acc);
  border-radius: 2px;
}

.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(30px, 5vw, 68px);
  align-items: start;
  padding-block: clamp(40px, 5vw, 64px) clamp(60px, 8vw, 100px);
}

.art__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-4);
  margin-bottom: 22px;
}

.art__cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 40px;
}

.prose {
  font-size: 16px;
  line-height: 1.95;
  color: var(--fg-2);
  max-width: 72ch;
}

.prose > * + * {
  margin-top: 20px;
}

.prose h2 {
  font-size: clamp(21px, 2.4vw, 27px);
  color: var(--fg);
  margin-top: 46px;
  padding-top: 4px;
  letter-spacing: -0.028em;
  position: relative;
  padding-left: 16px;
}

.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 3px;
  height: 1.05em;
  background: var(--acc);
  border-radius: 2px;
}

.prose h3 {
  font-size: 18px;
  color: var(--fg);
  margin-top: 34px;
}

.prose strong {
  color: var(--fg);
  font-weight: 600;
}

.prose a {
  color: var(--acc);
  border-bottom: 1px solid var(--acc-line);
}

.prose ul,
.prose ol {
  padding-left: 22px;
  display: grid;
  gap: 10px;
}

.prose ul li {
  list-style: none;
  position: relative;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  background: var(--acc);
  border-radius: 1px;
  transform: rotate(45deg);
}

.prose ol {
  list-style: decimal;
}

.prose ol li {
  list-style: decimal;
}

.prose ol li::marker {
  color: var(--acc);
  font-family: var(--mono);
  font-size: 0.9em;
}

.prose blockquote {
  margin: 30px 0;
  padding: 18px 24px;
  border-left: 2px solid var(--acc);
  background: var(--acc-dim);
  border-radius: 0 10px 10px 0;
  color: var(--fg);
}

.prose img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--acc);
}

.prose pre {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--fg-2);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--line);
  margin-block: 36px;
}

/* 侧栏目录 */
.aside {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 26px;
}

.toc__t,
.aside__t {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 14px;
}

.toc a {
  display: block;
  font-size: 13px;
  color: var(--fg-3);
  padding: 6px 0 6px 13px;
  border-left: 1.5px solid var(--line);
  line-height: 1.55;
  transition: all 0.3s;
}

.toc a:hover,
.toc a.on {
  color: var(--acc);
  border-left-color: var(--acc);
}

.toc a.lv3 {
  padding-left: 26px;
  font-size: 12.5px;
}

.artnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 60px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.artnav a {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.35s;
  background: var(--bg-1);
}

.artnav a:hover {
  border-color: var(--acc-line);
  background: var(--bg-2);
}

.artnav i {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-4);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}

.artnav b {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
}

.artnav .nxt {
  text-align: right;
}

@media (max-width: 1000px) {
  .article {
    grid-template-columns: 1fr;
  }
  .aside {
    position: static;
    order: -1;
  }
  .toc {
    display: none;
  }
}

@media (max-width: 620px) {
  .artnav {
    grid-template-columns: 1fr;
  }
  .artnav .nxt {
    text-align: left;
  }
}

/* ============ 联系表单 ============ */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: start;
}

.cinfo {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 34px;
}

.cinfo__i {
  background: var(--bg);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 14px;
  align-items: start;
}

.cinfo__i svg {
  color: var(--acc);
  margin-top: 3px;
}

.cinfo__i b {
  display: block;
  font-size: 11.5px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  color: var(--fg-4);
  font-weight: 400;
  margin-bottom: 4px;
}

.cinfo__i span {
  font-size: 14.5px;
  color: var(--fg);
  word-break: break-all;
}

.form {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(43,95,166,0.05), transparent 45%), var(--bg-1);
}

.form h3 {
  font-size: 21px;
  margin-bottom: 8px;
}

.form__tip {
  font-size: 13px;
  color: var(--fg-3);
  margin-bottom: 26px;
}

.fgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.fld {
  display: grid;
  gap: 8px;
}

.fld--full {
  grid-column: 1 / -1;
}

.fld label {
  font-size: 12.5px;
  color: var(--fg-3);
  letter-spacing: 0.02em;
}

.fld label i {
  color: var(--acc);
  font-style: normal;
}

.fld input,
.fld textarea,
.fld select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-1);
  color: var(--fg);
  font-size: 14.5px;
  transition: border-color 0.3s, background 0.3s;
}

.fld select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2366798b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.fld select option {
  background: var(--bg-2);
  color: var(--fg);
}

.fld textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.7;
}

.fld input:focus,
.fld textarea:focus,
.fld select:focus {
  outline: none;
  border-color: var(--acc);
  background: var(--bg-2);
}

.fld input::placeholder,
.fld textarea::placeholder {
  color: var(--fg-4);
}

.fld.err input,
.fld.err textarea {
  border-color: #e0685c;
}

.fld__err {
  font-size: 12px;
  color: #e0685c;
  display: none;
}

.fld.err .fld__err {
  display: block;
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.form__foot {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form__msg {
  font-size: 13.5px;
}

.form__msg.ok {
  color: var(--acc);
}

.form__msg.no {
  color: #e0685c;
}

.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.spin {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .contact {
    grid-template-columns: 1fr;
  }
  .fgrid {
    grid-template-columns: 1fr;
  }
}
