/* ==========================================================================
   Physics-AI-Forum · 周报门户样式
   设计基调：纸感白底 + 深墨文字 + 一个主色 + 每个方向一个色相
   ========================================================================== */

:root {
  color-scheme: light dark;

  --bg: #fcfcfb;
  --bg-grid: rgba(15, 17, 21, 0.028);
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --surface-3: #eef0f4;
  --ink: #0f1115;
  --ink-2: #343b45;
  --muted: #5f6875;
  --faint: #667085;
  --line: #e6e8ed;
  --line-strong: #d3d7e0;
  --accent: #3b5bdb;
  --accent-soft: #eef1fe;
  --warn: #b45309;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-2: 0 12px 32px -18px rgba(16, 24, 40, 0.28), 0 2px 6px -2px rgba(16, 24, 40, 0.06);

  --wrap: 1080px;
  --header-h: 64px;

  --font: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d11;
    --bg-grid: rgba(255, 255, 255, 0.03);
    --surface: #12151b;
    --surface-2: #171b22;
    --surface-3: #1e232b;
    --ink: #f1f3f7;
    --ink-2: #cdd3dc;
    --muted: #98a1ae;
    --faint: #8b95a5;
    --line: #232933;
    --line-strong: #2f3742;
    --accent: #7c96ff;
    --accent-soft: #17203a;
    --warn: #f0a35e;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

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

@media (prefers-color-scheme: dark) {
  a:hover {
    color: #fff;
  }
}

::selection {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
}

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

img {
  max-width: 100%;
  height: auto;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.5rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

/* 阅读进度条 */
.progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #a78bfa));
  z-index: 60;
  transition: width 0.1s linear;
}

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  flex-shrink: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--ink), color-mix(in srgb, var(--ink) 72%, var(--accent)));
  color: var(--bg);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  line-height: 1;
  box-shadow: var(--shadow-1);
}

@media (prefers-color-scheme: dark) {
  .brand-mark {
    background: linear-gradient(145deg, #f5f7fb, #c9d2e3);
    color: #0b0d11;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 0.95rem;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.brand-text small {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.9rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-3);
  font-weight: 560;
}

.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nav-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.nav-search input {
  width: 120px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  outline: none;
}

.nav-search input::placeholder {
  color: var(--faint);
}

.header-github {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--muted);
}

.header-github:hover {
  color: var(--ink);
  background: var(--surface-2);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--bg)) 0%, var(--bg) 72%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% 40% auto auto;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 3.5rem;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 560;
  letter-spacing: 0.02em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 22%, transparent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.95rem, 3.6vw, 2.75rem);
  font-weight: 720;
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  margin: 1rem 0 0;
  max-width: 34em;
  font-size: 1rem;
  color: var(--muted);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

/* ---------- 按钮 ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.05rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 560;
  line-height: 1.4;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease;
}

@media (prefers-color-scheme: dark) {
  .button {
    background: #f5f7fb;
    color: #0b0d11;
  }
}

.button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
  color: var(--bg);
}

.button:active {
  transform: translateY(0);
}

.button.ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

@media (prefers-color-scheme: dark) {
  .button.ghost {
    background: var(--surface);
  }
}

.button.ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.button.small {
  padding: 0.42rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.button.block {
  width: 100%;
  margin-top: 1rem;
}

/* ---------- 本周速览卡 ---------- */
.week-card {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

.week-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.week-card-head p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 620;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.pill {
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pill-warn {
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  color: var(--warn);
  margin-left: 0.4rem;
}

.member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.member {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.55rem;
  padding: 0.42rem 0.1rem;
  font-size: 0.88rem;
  border-bottom: 1px dashed var(--line);
}

.member:last-child {
  border-bottom: 0;
}

.member-mark {
  width: 18px;
  flex-shrink: 0;
  text-align: center;
  font-size: 0.8rem;
}

.member.is-done .member-mark {
  color: #16a34a;
}

.member.is-todo {
  color: var(--muted);
}

.member.is-todo .member-mark {
  color: var(--faint);
}

.member-name {
  font-weight: 520;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  font-size: 0.76rem;
  color: var(--faint);
  white-space: nowrap;
}

.member-empty {
  padding: 0.6rem 0;
  font-size: 0.86rem;
  color: var(--muted);
  list-style: none;
}

.week-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- 区块 ---------- */
.section {
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--line);
}

main section:last-of-type {
  border-bottom: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.section-link {
  font-size: 0.84rem;
  color: var(--muted);
}

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

/* ---------- 卡片 ---------- */
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem 1.15rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--dir, var(--accent));
  opacity: 0.9;
}

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

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-date {
  font-size: 0.76rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.card-title {
  font-size: 1.02rem;
  font-weight: 640;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}

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

.card-summary {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

.card-author {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  min-width: 0;
}

.card-author:hover {
  color: var(--ink);
}

.card-author span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-week {
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* 头像 */
.avatar {
  border-radius: 50%;
  background: var(--surface-3);
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-fallback {
  display: inline-grid;
  place-items: center;
  width: var(--size, 24px);
  height: var(--size, 24px);
  font-size: calc(var(--size, 24px) * 0.44);
  color: var(--muted);
  font-weight: 600;
}

/* 方向 chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.14rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--chip, var(--accent)) 26%, transparent);
  background: color-mix(in srgb, var(--chip, var(--accent)) 9%, transparent);
  color: color-mix(in srgb, var(--chip, var(--accent)) 82%, var(--ink));
  font-size: 0.74rem;
  font-weight: 560;
  line-height: 1.6;
  white-space: nowrap;
}

.chip:hover {
  color: color-mix(in srgb, var(--chip, var(--accent)) 92%, var(--ink));
  border-color: color-mix(in srgb, var(--chip, var(--accent)) 50%, transparent);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chip, currentColor);
  flex-shrink: 0;
}

/* ---------- 方向卡 ---------- */
.directions {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}

.direction {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.direction:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--dir, var(--accent)) 45%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.direction-top {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 640;
  font-size: 0.98rem;
}

.direction-top .dot {
  background: var(--dir, var(--accent));
  width: 8px;
  height: 8px;
}

.direction-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.direction-count {
  margin-top: 0.4rem;
  font-size: 0.74rem;
  color: color-mix(in srgb, var(--dir, var(--accent)) 82%, var(--ink));
  font-variant-numeric: tabular-nums;
}

/* ---------- 行列表 ---------- */
.rows {
  display: grid;
  gap: 0.15rem;
}

.row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 108px 105px;
  align-items: center;
  gap: 1rem;
  padding: 0.62rem 0.7rem;
  border-radius: 9px;
  color: var(--ink);
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.row:hover {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.row-week {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.row-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 520;
}

.row-author,
.row-date {
  font-size: 0.78rem;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-date {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tag-now {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, #22c55e 16%, transparent);
  color: #15803d;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 600;
  vertical-align: 1px;
}

@media (prefers-color-scheme: dark) {
  .tag-now {
    color: #4ade80;
  }
}

/* ---------- 怎么参与 ---------- */
.howto h2 {
  margin: 0 0 1.1rem;
  font-size: 1.02rem;
  font-weight: 680;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.steps li {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.step-no {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  padding-top: 0.15rem;
  font-weight: 600;
}

.steps strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.steps p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 1.4rem 0 0;
  font-size: 0.8rem;
  color: var(--faint);
  overflow: hidden;
}

.crumbs a {
  color: var(--muted);
}

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

.crumbs span[aria-current="page"] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 40ch;
}

.crumb-sep {
  color: var(--line-strong);
}

/* ---------- 内页标题 ---------- */
.page-head {
  padding: 1.6rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.8rem;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.page-meta {
  margin: 0.5rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.author-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.8rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.author-head h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- 周报详情 ---------- */
.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  grid-template-areas: "main side";
  gap: 3rem;
  padding-bottom: 3rem;
  align-items: start;
}

.report {
  grid-area: main;
  min-width: 0;
  max-width: 780px;
}

.report-side {
  grid-area: side;
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.side-card {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.side-title {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
  font-size: 0.85rem;
  max-height: 46vh;
  overflow: auto;
}

.toc-list a {
  display: block;
  padding: 0.22rem 0.45rem;
  border-radius: 6px;
  border-left: 2px solid transparent;
  color: var(--muted);
  line-height: 1.5;
}

.toc-list a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.toc-list a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 520;
}

.toc-3 a {
  padding-left: 1.15rem;
  font-size: 0.82em;
}

.meta-list {
  margin: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.meta-list > div {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}

.meta-list dt {
  color: var(--faint);
}

.meta-list dd {
  margin: 0;
  color: var(--ink-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.side-actions {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.report-head {
  padding-top: 1.6rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

.tag:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.report-head h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  font-weight: 720;
  line-height: 1.3;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.report-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.byline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-2);
  font-weight: 520;
}

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

.dot-sep {
  color: var(--line-strong);
}

.goal {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 1.4rem 0 0;
  padding: 0.8rem 0 0.8rem 1rem;
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, var(--accent-soft), transparent 85%);
  border-radius: 0 8px 8px 0;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.goal span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- 正文排版 ---------- */
.prose {
  margin-top: 2rem;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 2.4rem 0 0.8rem;
  font-size: 1.28rem;
  font-weight: 680;
  letter-spacing: -0.015em;
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h3 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.06rem;
  font-weight: 640;
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose p {
  margin: 0.9rem 0;
}

.prose ul,
.prose ol {
  margin: 0.9rem 0;
  padding-left: 1.3rem;
}

.prose li {
  margin: 0.3rem 0;
}

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

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

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

.prose strong {
  color: var(--ink);
  font-weight: 640;
}

.prose blockquote {
  margin: 1.2rem 0;
  padding: 0.6rem 1rem;
  border-left: 3px solid var(--line-strong);
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 0 8px 8px 0;
}

.prose img {
  display: block;
  margin: 1.4rem auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  cursor: zoom-in;
}

.prose img[width] {
  max-width: 100%;
  height: auto;
}

/* 图片放大查看 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 4vh 4vw;
  background: rgba(8, 10, 14, 0.9);
  cursor: zoom-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.85);
  cursor: zoom-out;
}

.lightbox-close {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.prose hr {
  margin: 2.2rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose table {
  width: 100%;
  margin: 1.2rem 0;
  border-collapse: collapse;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  text-align: left;
}

.prose th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--ink);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.12em 0.36em;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--ink);
}

.prose pre {
  margin: 1.3rem 0;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.65;
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.header-anchor {
  color: var(--line-strong);
  opacity: 0;
  margin-right: 0.25rem;
  text-decoration: none;
  border: 0 !important;
  transition: opacity 0.12s ease;
}

.prose h2:hover .header-anchor,
.prose h3:hover .header-anchor,
.header-anchor:focus-visible {
  opacity: 1;
}

/* ---------- 上一篇 / 下一篇 ---------- */
.pager {
  display: flex;
  gap: 0.8rem;
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.pager-item {
  flex: 1 1 0;
  max-width: calc(50% - 0.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}

.pager-item:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-1);
}

.pager-item span {
  font-size: 0.74rem;
  color: var(--faint);
}

.pager-item strong {
  font-size: 0.88rem;
  font-weight: 560;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pager-item.is-next {
  text-align: right;
  align-items: flex-end;
}

/* ---------- 评论 ---------- */
.comments {
  margin: 3rem 0 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.comments-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  font-weight: 680;
}

.comments-title .muted {
  font-size: 0.78rem;
  font-weight: 400;
}

.comments-empty {
  padding: 1rem 1.1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.88rem;
}

.comments-empty p {
  margin: 0.3rem 0;
}

/* ---------- 归档 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.filter-bar input {
  flex: 1 1 240px;
  max-width: 320px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.filter-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip-btn {
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  padding: 0.22rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-pill);
}

.chip-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.chip-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.filter-count {
  min-height: 1.2rem;
  margin: 0 0 1.2rem;
  font-size: 0.8rem;
}

.year-block {
  margin-bottom: 2.2rem;
}

.year-title {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.year-title .muted {
  font-size: 0.8rem;
  font-weight: 400;
}

.archive-week {
  margin-bottom: 1.1rem;
}

.archive-week-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.4rem 0.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.archive-week-head a {
  color: var(--ink);
}

.archive-week-head .muted {
  font-weight: 400;
  font-size: 0.78rem;
}

.row[hidden],
.archive-week[hidden],
.year-block[hidden] {
  display: none;
}

/* ---------- 周次导航 / 404 ---------- */
.week-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 3rem;
}

.notfound {
  padding: 5rem 0 6rem;
}

.notfound h1 {
  margin: 0.2rem 0 0.8rem;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 720;
  letter-spacing: -0.02em;
}

.empty {
  padding: 1.4rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- 搜索 ---------- */
#search {
  max-width: 46rem;
  padding-bottom: 3rem;
}

.pagefind-ui__search-input {
  font-family: var(--font) !important;
  border-radius: 10px !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
}

.pagefind-ui__result {
  border-top: 1px solid var(--line) !important;
}

.pagefind-ui__result-link {
  color: var(--accent) !important;
}

.pagefind-ui__result-excerpt {
  color: var(--muted) !important;
}

/* ---------- 新建周报表单 ---------- */
.form-card {
  max-width: 780px;
  padding: 1.4rem 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  margin-bottom: 3rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.84rem;
  color: var(--ink-2);
}

.field > span {
  font-weight: 560;
}

.field em {
  font-style: normal;
  font-weight: 400;
  color: var(--faint);
  font-size: 0.92em;
}

.field input,
.field select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.file-preview {
  margin: 1.2rem 0 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.file-preview code {
  font-family: var(--mono);
  font-size: 0.95em;
  padding: 0.15em 0.45em;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--ink);
}

.form-hint,
.form-note {
  margin: 0.35rem 0;
  font-size: 0.8rem;
  color: var(--warn);
}

.form-note {
  color: var(--faint);
}

.form-card .button {
  margin-top: 1.1rem;
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2rem 0 2.2rem;
  font-size: 0.84rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand p {
  margin: 0 0 0.35rem;
}

.footer-brand strong {
  font-size: 0.92rem;
}

.footer-brand span {
  margin-left: 0.5rem;
  color: var(--faint);
}

.footer-brand .muted {
  max-width: 46ch;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
}

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

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

.footer-meta {
  margin: 1.4rem auto 0;
  font-size: 0.76rem;
  color: var(--faint);
}

/* ---------- 代码高亮 ---------- */
.hljs-comment,
.hljs-quote {
  color: var(--faint);
  font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-built_in {
  color: #c2418f;
}

.hljs-string,
.hljs-attr,
.hljs-template-tag {
  color: #21844a;
}

.hljs-number,
.hljs-symbol {
  color: #b45309;
}

.hljs-title,
.hljs-section,
.hljs-name {
  color: #1d4ed8;
}

@media (prefers-color-scheme: dark) {
  .hljs-keyword,
  .hljs-selector-tag,
  .hljs-literal,
  .hljs-built_in {
    color: #f191b8;
  }
  .hljs-string,
  .hljs-attr,
  .hljs-template-tag {
    color: #7ee2a8;
  }
  .hljs-number,
  .hljs-symbol {
    color: #f6c177;
  }
  .hljs-title,
  .hljs-section,
  .hljs-name {
    color: #8ab4ff;
  }
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1000px) {
  .report-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "side" "main";
    gap: 0;
  }

  .report-side {
    position: static;
    margin-top: 1.4rem;
    grid-template-columns: 1fr;
  }

  .toc-list {
    max-height: 30vh;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .week-card {
    max-width: 420px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15.5px;
  }

  .wrap {
    width: min(var(--wrap), 100% - 2rem);
  }

  .header-inner {
    gap: 0.75rem;
  }

  .brand-text small {
    display: none;
  }

  .nav-search {
    display: none;
  }

  .site-nav {
    font-size: 0.86rem;
  }

  .hero {
    padding: 2.4rem 0 2.2rem;
  }

  .section {
    padding: 2rem 0;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .week-card {
    max-width: none;
  }

  .pager {
    flex-direction: column;
  }

  .row {
    grid-template-columns: 68px minmax(0, 1fr) auto;
    gap: 0.7rem;
    padding: 0.6rem 0.5rem;
  }

  .row-date {
    display: none;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .pager-item.is-next {
    text-align: left;
    align-items: flex-start;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .directions {
    grid-template-columns: 1fr 1fr;
  }

  .prose {
    font-size: 0.98rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
  }
}

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

  .hero h1 {
    font-size: 1.7rem;
  }

  .brand-text strong {
    font-size: 0.88rem;
  }
}
