/* gatsk.cc — 前台样式（Design Token 驱动，保基因：暖黑纸色 + 陶土红 + 衬线标题 + 直角） */

:root {
  /* ---- 保留 Token ---- */
  --paper: #1A1D22;
  --surface: #23272C;
  --raised: #2A2F37;
  --ink: #ECEAE3;
  --muted: #A2A8B1;
  --line: #343A44;
  --accent: #C64B31;
  --bone: #F1EEE7;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* ---- 新增 Token ---- */
  --line-soft: rgba(255, 255, 255, 0.06);
  --accent-soft: rgba(198, 75, 49, 0.10);
  --accent-ink: #F5EDE8;
  --accent-hover: #B03E28;
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --card-index: rgba(236, 234, 227, 0.18);
  --danger: #BF3B24;
  --success: #4C9A6E;
  --warn: #C9A227;
  --focus-ring: 0 0 0 3px rgba(198, 75, 49, 0.35);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.25);

  /* ---- 动效 ---- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

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

/* ---------- 图标（全站唯一 SVG symbol sprite，禁 emoji） ---------- */

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: -0.2em;
  color: currentColor;
}

.icon--sm { width: 16px; height: 16px; }
.icon--md { width: 20px; height: 20px; }
.icon--lg { width: 34px; height: 34px; }
.icon--xl { width: 52px; height: 52px; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
}

.wordmark {
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.wordmark span {
  color: var(--accent);
}

.wordmark-logo {
  height: 26px;
  width: auto;
  aspect-ratio: 120 / 36;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  justify-content: center;
}

.nav-links a {
  position: relative;
  padding: 20px 0 18px;
  color: var(--muted);
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a.is-active {
  color: var(--ink);
  font-weight: 600;
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 2px;
  background: var(--accent);
}

.badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 3px 9px;
  white-space: nowrap;
}

/* ---------- shared page header ---------- */

.page-head {
  padding: 88px 0 48px;
}

.page-head--center {
  text-align: center;
}

.page-head--center .lead {
  margin-inline: auto;
}

.notfound-actions {
  margin-top: 28px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.hero .eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  margin-right: 10px;
}

.page-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.35;
  letter-spacing: 0;
}

.page-head .lead {
  max-width: 640px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 24px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn .icon {
  transition: transform 0.18s ease;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn:hover .icon {
  transform: translateX(3px);
}

.btn--solid {
  background: var(--ink);
  color: var(--paper);
}

.btn--solid:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bone);
}

.btn--on-dark {
  border-color: var(--bone);
  color: var(--bone);
}

.btn--on-dark:hover {
  background: var(--bone);
  color: var(--paper);
}

.btn--solid-on-dark {
  background: var(--bone);
  border-color: var(--bone);
  color: var(--paper);
}

.btn--solid-on-dark:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bone);
}

.btn.is-disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.7;
}

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.entries .card {
  position: relative;
  counter-increment: idx;
}

.entries .card::after {
  content: counter(idx, decimal-leading-zero);
  position: absolute;
  top: 14px;
  right: 18px;
  font: 11px var(--mono);
  color: var(--card-index);
}

.card .card-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.card p {
  font-size: 14px;
  color: var(--muted);
}

.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  padding-bottom: 2px;
  position: relative;
  transition: color 0.18s var(--ease);
}

.card .card-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s var(--ease);
}

.card .card-link:hover {
  color: var(--accent);
}

.card:hover .card-link::after {
  transform: scaleX(1);
}

/* ---------- homepage ---------- */

.hero {
  padding: 110px 0 72px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 54px);
  line-height: 1.32;
  letter-spacing: 0;
  max-width: 760px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.hero .lead {
  max-width: 560px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 17px;
}

.hero-meta {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font: 11px var(--mono);
  letter-spacing: 0.14em;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
}

.hero-actions .btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bone);
}

.hero-actions .btn--solid:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bone);
}

.notice {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  padding: 26px 30px;
  margin-bottom: 44px;
}

.notice .notice-label {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--accent);
  margin-bottom: 8px;
}

.notice .notice-label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  margin-right: 10px;
}

.notice p {
  font-size: 15px;
  color: var(--ink);
}

.notice p + p {
  margin-top: 8px;
}

.notice a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.notice a:hover {
  border-color: var(--accent);
}

.subnav {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.subnav-inner {
  display: flex;
  gap: 30px;
  padding: 13px 0;
  overflow-x: auto;
}

.subnav-inner a {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  position: relative;
  transition: color 0.18s ease;
}

.subnav-inner a:hover {
  color: var(--ink);
}

.subnav-inner a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -13px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.18s ease;
}

.subnav-inner a:hover::after {
  transform: scaleX(1);
}

.entries {
  counter-reset: idx;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 72px;
}

/* compact layout: fit homepage on one screen */
.index-page .hero {
  padding: 36px 0 20px;
}

.index-page .hero h1 {
  font-size: 28px;
  line-height: 1.28;
}

.index-page .hero .lead {
  margin-top: 10px;
  font-size: 14px;
}

.index-page .hero-actions {
  margin-top: 14px;
}

.index-page .hero-actions .btn {
  padding: 9px 20px;
  font-size: 13px;
}

.index-page .notice {
  padding: 12px 20px;
  margin-bottom: 16px;
}

.index-page .notice .notice-label {
  font-size: 14px;
  margin-bottom: 4px;
}

.index-page .notice p {
  font-size: 12.5px;
  line-height: 1.5;
}

.index-page .notice p + p {
  margin-top: 4px;
}

.index-page .entries {
  gap: 10px;
  margin-bottom: 18px;
}

.index-page .card {
  padding: 12px 16px;
}

.index-page .card .card-tag {
  margin-bottom: 6px;
  font-size: 10px;
}

.index-page .card h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

.index-page .card p {
  font-size: 12px;
  line-height: 1.45;
}

.index-page .card .card-link {
  margin-top: 8px;
  font-size: 12px;
}

.index-page .band {
  padding: 16px 0;
}

.index-page .band h2 {
  font-size: 22px;
}

.index-page .band p {
  margin-top: 6px;
  font-size: 13px;
}

.index-page .band .band-actions {
  margin-top: 12px;
}

.index-page .band .btn {
  padding: 9px 20px;
  font-size: 13px;
}

.index-page .footer {
  padding: 14px 0 18px;
}

.index-page .footer-meta {
  margin-top: 8px;
}

/* compact layout: fit video list on one screen (3×2 grid) */
.videos-page .page-head {
  padding: 28px 0 16px;
}

.videos-page .page-head h1 {
  font-size: 32px;
}

.videos-page .page-head .lead {
  margin-top: 8px;
  font-size: 14px;
}

.videos-page .video-grid {
  gap: 12px;
  padding-bottom: 22px;
}

.videos-page .video-body {
  padding: 11px 14px 13px;
}

.videos-page .video-body .video-tag {
  margin-bottom: 6px;
  font-size: 10.5px;
}

.videos-page .video-body h3 {
  font-size: 13.5px;
}

.videos-page .video-body .video-meta {
  margin-top: 6px;
  font-size: 10.5px;
}

.videos-page .video-cover .icon {
  width: 26px;
  height: 26px;
}

.videos-page .footer {
  padding: 14px 0 18px;
}

.videos-page .footer-meta {
  margin-top: 8px;
}

/* compact layout: fit video detail on one screen */
.video-page .breadcrumb {
  padding-top: 24px;
}

.video-page .player {
  margin-bottom: 24px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.player-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--paper);
}

.video-page .article {
  padding-bottom: 32px;
}

.video-page .article h1 {
  font-size: 26px;
}

.video-page .article .article-meta-row {
  margin-bottom: 16px;
}

.video-page .article .article-meta {
  margin-bottom: 12px;
  font-size: 11px;
}

.video-page .article p {
  font-size: 13.5px;
  margin-bottom: 8px;
  line-height: 1.6;
}

.video-page .footer {
  padding: 14px 0 18px;
}

.video-page .footer-meta {
  margin-top: 8px;
}

/* compact layout: fit contact page on one screen */
.contact-page .page-head {
  padding: 76px 0 36px;
}

.contact-page .page-head h1 {
  font-size: 38px;
}

.contact-page .page-head .lead {
  margin-top: 14px;
  font-size: 16px;
}

.contact-page .qr-row {
  padding: 58px 0 40px;
  gap: 72px;
}

.contact-page .qr-box {
  width: 210px;
  height: 210px;
  font-size: 13px;
}

.contact-page .qr-item .qr-label {
  font-size: 19px;
}

.contact-page .qr-item .qr-sub {
  font-size: 12px;
}

.contact-page .contact-note {
  padding: 26px 0 40px;
}

.contact-page .footer {
  padding: 26px 0 30px;
}

.contact-page .footer-meta {
  margin-top: 12px;
}

.band {
  background: var(--raised);
  color: var(--bone);
  padding: 76px 0;
  margin-bottom: 0;
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--line);
}

.band-label {
  font: 11px var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bone) 55%, transparent);
  margin-bottom: 12px;
}

.band h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: 0;
  line-height: 1.4;
}

.band p {
  max-width: 560px;
  margin-top: 14px;
  color: color-mix(in srgb, var(--bone) 72%, transparent);
  font-size: 15px;
}

.band .band-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
}

/* ---------- videos ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-bottom: 88px;
}

.video-grid--3 {
  padding-bottom: 0;
}

.block-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}

.block-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0;
}

.block-head .block-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.pinned-block .video-grid {
  padding-bottom: 36px;
}

.latest-block .video-grid {
  padding-bottom: 24px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-bottom: 88px;
}

.pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px 20px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.pager-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pager-btn.is-disabled {
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}

.pager-current {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.video-card {
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}

.video-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.video-cover {
  aspect-ratio: 16 / 9;
  background: var(--raised);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: background 0.2s ease;
}

.video-cover .icon {
  color: var(--muted);
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-card:hover .video-cover {
  background: color-mix(in srgb, var(--raised) 88%, var(--ink));
}

.video-body {
  padding: 18px 20px 20px;
}

.video-body .video-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.video-body h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}

.video-body .video-meta {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* ---------- 面包屑 ---------- */

.breadcrumb {
  padding-top: 28px;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb li a {
  color: var(--muted);
  transition: color 0.18s ease;
}

.breadcrumb li a:hover {
  color: var(--ink);
}

.breadcrumb li[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.breadcrumb .breadcrumb-sep {
  display: inline-flex;
  color: var(--line);
}

.breadcrumb .breadcrumb-sep .icon {
  width: 12px;
  height: 12px;
}

/* ---------- video detail ---------- */

.back-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  transition: color 0.18s ease;
}

.back-link:hover {
  color: var(--accent);
}

.player {
  aspect-ratio: 16 / 9;
  background: var(--raised);
  display: grid;
  place-items: center;
  position: relative;
  margin-bottom: 40px;
}

.player .icon {
  color: var(--muted);
}

.player .player-note {
  position: absolute;
  bottom: 14px;
  left: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--bone) 55%, transparent);
}

.article {
  max-width: 720px;
  padding-bottom: 88px;
}

.article h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.4;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.article .article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 10px;
}

.article .article-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 34px;
}

/* ---------- callout（accent-soft 全框） ---------- */

.callout {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 20px 24px;
  margin: 28px 0;
}

.callout .callout-label {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.callout .callout-label .icon {
  color: var(--accent);
}

.callout ul {
  list-style: none;
  padding: 0;
}

.callout li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  color: var(--ink);
}

.callout li + li {
  margin-top: 8px;
}

.callout li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

/* ---------- prose（正文富文本体系） ---------- */

.prose {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

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

.prose h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.prose h2:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.prose h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0;
  margin-top: 28px;
}

.prose h2 + h3 {
  margin-top: 18px;
}

.prose p {
  margin: 0;
}

.prose a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color 0.18s ease;
}

.prose a:hover {
  border-color: var(--accent);
}

.prose ul,
.prose ol {
  padding-left: 24px;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 8px;
}

.prose li::marker {
  color: var(--accent);
}

/* 表格：1px 全框 */
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  border: 1px solid var(--line);
  margin-top: 24px;
}

.prose table th,
.prose table td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.prose table thead th {
  background: var(--surface);
  font-weight: 600;
}

.prose table tbody tr:nth-child(even) {
  background: var(--line-soft);
}

/* 引用块：左竖线 + 浅底 */
.prose blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px 20px;
  color: var(--muted);
  margin: 24px 0;
}

.prose blockquote p {
  margin: 0;
}

/* 插图（含 alt） */
.prose figure {
  margin: 28px 0;
}

.prose figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
}

.prose figure figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.prose img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 6px;
}

.prose pre {
  background: var(--raised);
  border: 1px solid var(--line);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
}

/* 视频占位（后台 Quill 插入，前台由服务端渲染为播放器） */
.video-embed {
  margin: 20px 0;
  aspect-ratio: 16 / 9;
  background: var(--raised);
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  position: relative;
}

.video-embed::after {
  content: "视频";
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.faq h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0;
  margin-bottom: 18px;
}

.faq .prose p {
  font-size: 15px;
}

/* ---------- 相关视频 / 相关阅读 ---------- */

.related {
  padding: 48px 0 88px;
}

/* ---------- 文章列表 / 详情 ---------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-bottom: 88px;
}

.post-grid--3 {
  padding-bottom: 0;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  display: block;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.post-cover {
  aspect-ratio: 16 / 9;
  background: var(--raised);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.post-cover .cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-cover-fallback {
  display: grid;
  place-items: center;
}

.post-cover-fallback .icon {
  color: var(--muted);
}

.post-body {
  padding: 18px 20px 20px;
}

.post-body h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}

.post-excerpt {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.6;
}

.post-hero {
  margin: 0 0 28px;
}

.post-hero img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 10px;
}

.chip .icon {
  color: var(--accent);
}

/* ---------- 空状态 / Toast ---------- */

.empty-state {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 48px 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.empty-state .icon {
  color: var(--line);
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 16px);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px 20px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1200;
}

.toast.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast .icon {
  color: var(--success);
}

/* ---------- services ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding-bottom: 56px;
}

.service-card {
  display: flex;
  flex-direction: column;
}

.service-card p {
  flex: 1;
}

.service-card .btn {
  align-self: flex-start;
  margin-top: 22px;
  padding: 9px 20px;
  font-size: 13px;
}

.service-note {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 88px;
}

.service-note p {
  font-size: 15px;
}

.service-note p span {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--accent);
}

/* compact layout: fit services page on one screen */
.services-page .page-head {
  padding: 28px 0 14px;
}

.services-page .page-head h1 {
  font-size: 34px;
}

.services-page .page-head .eyebrow {
  margin-bottom: 10px;
}

.services-page .page-head .lead {
  margin-top: 10px;
  font-size: 15px;
}

.services-page .service-grid {
  gap: 11px;
  padding-bottom: 22px;
}

.services-page .card {
  padding: 16px 21px;
}

.services-page .card .card-tag {
  margin-bottom: 8px;
}

.services-page .card h3 {
  font-size: 19px;
  margin-bottom: 6px;
}

.services-page .card p {
  font-size: 13px;
}

.services-page .service-card .btn {
  margin-top: 12px;
  padding: 8px 18px;
  font-size: 12.5px;
}

.services-page .service-note {
  padding: 13px 21px;
  margin-bottom: 0;
}

.services-page .service-note p {
  font-size: 13.5px;
}

.services-page .service-note .btn {
  padding: 9px 18px;
  font-size: 12.5px;
}

.services-page .footer {
  padding: 16px 0 20px;
}

.services-page .footer-meta {
  margin-top: 10px;
}

/* ---------- residential ip ---------- */

.ip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 18px 0 16px;
}

.ip-lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
}

.ip-cta-top {
  margin-top: 28px;
}

.ip-cta-top .btn {
  width: 100%;
  justify-content: center;
  padding: 18px 24px;
  font-size: 17px;
}

/* compact layout: fit residential IP page on one screen */
.ip-page .page-head {
  padding: 44px 0 24px;
}

.ip-page .page-head h1 {
  font-size: 36px;
}

.ip-page .page-head .eyebrow {
  margin-bottom: 12px;
}

.ip-page .page-head .lead {
  margin-top: 12px;
  font-size: 16px;
}

.ip-page .ip-cta-top {
  margin-top: 20px;
}

.ip-page .ip-cta-top .btn {
  padding: 15px 24px;
  font-size: 16px;
}

.ip-page .ip-grid {
  margin: 18px 0 16px;
  gap: 16px;
}

.ip-page .ip-recommend {
  padding: 30px 32px;
}

.ip-page .ip-recommend h2 {
  font-size: 26px;
}

.ip-page .ip-recommend .rec-label {
  margin-bottom: 12px;
}

.ip-page .ip-recommend p {
  margin-top: 12px;
  font-size: 15px;
}

.ip-page .ip-sub .card {
  padding: 22px 26px;
}

.ip-page .ip-sub .card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.ip-page .ip-sub .card p {
  font-size: 14px;
}

.ip-page .footer {
  padding: 20px 0 24px;
}

.ip-page .footer-meta {
  margin-top: 12px;
}

.ip-recommend {
  background: var(--raised);
  color: var(--bone);
  padding: 40px;
  border: 1px solid var(--line);
}

.ip-recommend .rec-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bone) 60%, transparent);
  display: block;
  margin-bottom: 14px;
}

.ip-recommend h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0;
}

.ip-recommend .rec-badge {
  display: inline-block;
  font-size: 12px;
  color: var(--bone);
  border: 1px solid color-mix(in srgb, var(--bone) 55%, transparent);
  padding: 2px 10px;
  margin-left: 12px;
  vertical-align: middle;
}

.ip-recommend p {
  margin-top: 14px;
  color: color-mix(in srgb, var(--bone) 75%, transparent);
  font-size: 15px;
  max-width: 600px;
}

.ip-sub {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 44px;
}

.ip-cta {
  padding-bottom: 88px;
}

.ip-cta .btn {
  margin-right: 12px;
}

.ip-cta .note {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- tools ---------- */

.tools-section {
  padding: 0 0 64px;
}

.tools-section + .tools-section {
  border-top: 1px solid var(--line);
  padding-top: 56px;
}

.tools-section {
  scroll-margin-top: 140px;
}

.tools-section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.tools-section .section-desc {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 28px;
  max-width: 640px;
}

.tool-feature {
  background: var(--raised);
  color: var(--bone);
  padding: 36px 40px;
  border: 1px solid var(--line);
}

.tool-feature .rec-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bone) 60%, transparent);
  display: block;
  margin-bottom: 12px;
}

.tool-feature h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0;
}

.tool-feature-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.tool-feature p {
  margin-top: 12px;
  color: color-mix(in srgb, var(--bone) 78%, transparent);
  font-size: 15px;
  max-width: 620px;
}

.tool-feature .btn {
  margin-top: 24px;
}

.exclusive {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--raised);
  border: 1px solid var(--line);
  padding: 26px 32px;
  margin-top: 16px;
}

.exclusive .rec-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bone) 60%, transparent);
  display: block;
  margin-bottom: 6px;
}

.exclusive .exclusive-url {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--accent);
}

.browser-list {
  display: grid;
  gap: 12px;
}

.browser-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px 28px;
  transition: border-color 0.2s ease;
}

.browser-row:hover {
  border-color: var(--ink);
}

.browser-row h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0;
  margin-bottom: 6px;
}

.browser-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.browser-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.browser-info h3 {
  margin-bottom: 0;
}

.browser-info p {
  width: 100%;
}

.browser-row p {
  font-size: 14px;
  color: var(--muted);
  max-width: 620px;
}

.browser-row .btn {
  white-space: nowrap;
  padding: 9px 20px;
  font-size: 13px;
}

.table-scroll {
  overflow-x: auto;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
}

.compare th,
.compare td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare thead th {
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}

.compare tbody th {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
}

.compare tbody tr:last-child th,
.compare tbody tr:last-child td {
  border-bottom: none;
}

.table-note {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

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

.app-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.app-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.app-card-head .card-tag {
  margin-bottom: 4px;
}

.app-card-head h3 {
  margin-bottom: 0;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.tool-link:hover {
  border-color: var(--accent);
}

.ip-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.cross-tools {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.cross-tool-card {
  display: flex;
  flex-direction: column;
}

.cross-tool-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.cross-tool-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.cross-tool-head h3 {
  margin-bottom: 0;
}

.cross-tool-card p {
  flex: 1;
}

.ip-tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px 24px;
  transition: border-color 0.2s ease;
}

.ip-tool-card:hover {
  border-color: var(--ink);
}

.ip-tool-card .tool-name {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.ip-tool-card p {
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- contact ---------- */

.qr-row {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
  padding: 40px 0 24px;
}

.qr-item {
  text-align: center;
}

.qr-box {
  width: 168px;
  height: 168px;
  background: var(--surface);
  border: 1px dashed var(--muted);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.qr-item .qr-label {
  margin-top: 14px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
}

.qr-item .qr-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.qr-img {
  cursor: zoom-in;
  display: block;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.qr-img:hover {
  border-color: var(--accent);
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  background: var(--bone);
  border-radius: 2px;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 26px;
  color: var(--bone);
  cursor: pointer;
  user-select: none;
  padding: 6px;
  transition: color 0.15s ease;
  display: inline-flex;
}

.lightbox-close .icon {
  width: 28px;
  height: 28px;
}

.lightbox-close:hover {
  color: var(--accent);
}

.contact-note {
  border-top: 1px solid var(--line);
  padding: 24px 0 88px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 14px;
  font-weight: 600;
}

.footer-brand span {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 13px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-contact {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.footer-meta {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .entries,
  .service-grid,
  .pair,
  .ip-sub,
  .ip-grid {
    grid-template-columns: 1fr;
  }

  .video-grid,
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ip-tools {
    grid-template-columns: repeat(2, 1fr);
  }

  .browser-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(1080px, 100% - 32px);
  }

  .nav-inner {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .nav-links {
    gap: 18px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-links a {
    padding: 4px 0 8px;
  }

  .nav-links a.is-active::after {
    bottom: 3px;
  }

  .badge {
    display: none;
  }

  .hero {
    padding: 72px 0 52px;
  }

  .hero-actions,
  .band-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .video-grid,
  .post-grid,
  .ip-tools {
    grid-template-columns: 1fr;
  }

  .cross-tools {
    grid-template-columns: 1fr;
  }

  .page-head {
    padding: 64px 0 36px;
  }

  .band {
    padding: 56px 0;
  }

  .ip-recommend,
  .tool-feature {
    padding: 28px 24px;
  }

  .qr-row {
    gap: 40px;
  }

  .article-meta-row {
    gap: 8px;
  }

  .pager {
    flex-wrap: wrap;
    gap: 10px;
  }
}

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