/* =========================================================
   Margin — 文献笔记
   毛玻璃 / 沉浸式首屏设计系统
   静态预览与 Django 模板共用
   ========================================================= */

:root {
  --text: #f3f6f3;
  --text-2: rgba(238, 245, 240, 0.72);
  --muted: rgba(238, 245, 240, 0.46);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --glass-hover: rgba(255, 255, 255, 0.075);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-strong: rgba(255, 255, 255, 0.22);
  --hairline: rgba(255, 255, 255, 0.09);
  --accent: #9fe6c8;
  --accent-2: #6fc5a6;
  --accent-soft: rgba(159, 230, 200, 0.13);
  --accent-ink: #06211a;
  --shadow: 0 24px 70px -28px rgba(0, 0, 0, 0.75);
  --shadow-soft: 0 12px 40px -24px rgba(0, 0, 0, 0.7);
  --danger: #f0a29a;

  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", Georgia,
    "Songti SC", "Noto Serif CJK SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --radius-lg: 28px;
  --radius: 20px;
  --container: 760px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="light"] {
  --text: #10201b;
  --text-2: rgba(16, 32, 27, 0.7);
  --muted: rgba(16, 32, 27, 0.46);
  --glass: rgba(255, 255, 255, 0.46);
  --glass-strong: rgba(255, 255, 255, 0.62);
  --glass-hover: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-border-strong: rgba(255, 255, 255, 0.95);
  --hairline: rgba(16, 32, 27, 0.1);
  --accent: #226b53;
  --accent-2: #2f8a6c;
  --accent-soft: rgba(34, 107, 83, 0.11);
  --accent-ink: #ffffff;
  --shadow: 0 24px 70px -34px rgba(24, 58, 46, 0.45);
  --shadow-soft: 0 12px 40px -30px rgba(24, 58, 46, 0.4);
  --danger: #a8443b;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #06090a;
  background-image:
    radial-gradient(1100px 780px at 8% -12%, rgba(31, 118, 98, 0.5), transparent 62%),
    radial-gradient(900px 700px at 92% 4%, rgba(53, 68, 138, 0.42), transparent 62%),
    radial-gradient(1000px 820px at 48% 112%, rgba(22, 83, 68, 0.42), transparent 64%),
    linear-gradient(180deg, #070b0c 0%, #050809 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: color 0.5s var(--ease);
}

[data-theme="light"] body {
  background-color: #eef1ec;
  background-image:
    radial-gradient(1100px 780px at 6% -12%, rgba(150, 210, 186, 0.6), transparent 62%),
    radial-gradient(900px 700px at 94% 6%, rgba(190, 200, 236, 0.55), transparent 62%),
    radial-gradient(1000px 820px at 46% 112%, rgba(196, 226, 208, 0.6), transparent 64%),
    linear-gradient(180deg, #f2f5f0 0%, #e9ede7 100%);
}

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

button {
  font: inherit;
  color: inherit;
}

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

/* ---------- 背景光晕层 ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}

.orb-1 {
  width: 46vw;
  height: 46vw;
  min-width: 340px;
  min-height: 340px;
  top: -12%;
  left: -6%;
  background: radial-gradient(circle, rgba(64, 190, 154, 0.5), transparent 68%);
  animation: drift-a 28s ease-in-out infinite alternate;
}

.orb-2 {
  width: 40vw;
  height: 40vw;
  min-width: 300px;
  min-height: 300px;
  top: 8%;
  right: -10%;
  background: radial-gradient(circle, rgba(86, 106, 210, 0.42), transparent 68%);
  animation: drift-b 34s ease-in-out infinite alternate;
}

.orb-3 {
  width: 52vw;
  height: 42vw;
  min-width: 320px;
  bottom: -22%;
  left: 28%;
  background: radial-gradient(circle, rgba(38, 132, 108, 0.42), transparent 70%);
  animation: drift-c 40s ease-in-out infinite alternate;
}

[data-theme="light"] .orb {
  opacity: 0.55;
  filter: blur(100px);
}

[data-theme="light"] .orb-1 {
  background: radial-gradient(circle, rgba(150, 222, 195, 0.75), transparent 68%);
}

[data-theme="light"] .orb-2 {
  background: radial-gradient(circle, rgba(188, 198, 238, 0.7), transparent 68%);
}

[data-theme="light"] .orb-3 {
  background: radial-gradient(circle, rgba(198, 232, 211, 0.75), transparent 70%);
}

.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

[data-theme="light"] .grain {
  opacity: 0.045;
}

@keyframes drift-a {
  to {
    transform: translate3d(6%, 4%, 0) scale(1.12);
  }
}

@keyframes drift-b {
  to {
    transform: translate3d(-7%, 6%, 0) scale(1.08);
  }
}

@keyframes drift-c {
  to {
    transform: translate3d(-4%, -6%, 0) scale(1.15);
  }
}

/* ---------- 布局 ---------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

section[id] {
  scroll-margin-top: 96px;
}

/* ---------- 浮动玻璃导航 ---------- */

.site-header {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 0 16px;
  background: none;
  border: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 1000px;
  height: 62px;
  margin: 0 auto;
  padding: 0 9px 0 22px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  box-shadow: var(--shadow-soft);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.site-header.is-scrolled .header-inner {
  background: var(--glass-strong);
  border-color: var(--glass-border-strong);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  margin-right: auto;
  min-width: 0;
}

.brand-mark {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  letter-spacing: -0.015em;
  line-height: 1;
}

.brand-sub {
  position: relative;
  padding-left: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.brand-sub::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 11px;
  background: var(--hairline);
  transform: translateY(-50%);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.nav a:hover {
  color: var(--text);
  background: var(--glass-hover);
}

.nav a.is-active {
  color: var(--text);
  background: var(--glass-strong);
  border-color: var(--glass-border);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.4s var(--ease);
}

.theme-toggle:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border);
  color: var(--text);
  transform: rotate(-14deg);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease),
    color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.btn:hover {
  background: var(--glass-strong);
  border-color: var(--glass-border-strong);
  transform: translateY(-1px);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: 0 10px 30px -14px rgba(111, 197, 166, 0.7);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent));
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: 0 14px 36px -14px rgba(111, 197, 166, 0.8);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border);
  color: var(--text);
}

.btn-sm {
  height: 34px;
  padding: 0 15px;
  font-size: 12.5px;
}

.btn-lg {
  height: 46px;
  padding: 0 26px;
  font-size: 14px;
}

.btn-danger {
  color: var(--danger);
}

.btn-danger:hover {
  border-color: rgba(240, 162, 154, 0.45);
  color: var(--danger);
}

.btn-danger-solid {
  background: linear-gradient(135deg, #c9635a, #a8443b);
  border-color: transparent;
  color: #fff;
}

.btn-danger-solid:hover {
  background: #a8443b;
  border-color: transparent;
  color: #fff;
}

.btn-block {
  width: 100%;
  height: 46px;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 150px 0 24px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 12%;
  left: 26%;
  width: min(880px, 74vw);
  height: min(560px, 58vw);
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(159, 230, 200, 0.13),
    transparent 66%
  );
  filter: blur(30px);
  pointer-events: none;
}

.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.68fr);
  align-content: center;
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
}

.hero-main {
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-2);
  box-shadow: var(--shadow-soft);
}

.pulse-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: pulse 2.8s var(--ease) infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.4);
    opacity: 0.8;
  }
  70%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.hero-title {
  margin: 34px 0 28px;
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.09em;
  margin-bottom: -0.09em;
}

.hero-title .line-in {
  display: block;
  white-space: nowrap;
  transform: translateY(115%);
  animation: line-rise 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(120ms + var(--i, 0) * 140ms);
}

@keyframes line-rise {
  to {
    transform: translateY(0);
  }
}

.hero-title em {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.01em;
  background-image: linear-gradient(
    100deg,
    #f4fff9 0%,
    var(--accent) 34%,
    var(--accent-2) 58%,
    #f4fff9 100%
  );
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 9s ease-in-out infinite alternate;
}

@keyframes sheen {
  to {
    background-position: 100% 50%;
  }
}

[data-theme="light"] .hero-title em {
  background-image: linear-gradient(
    100deg,
    #14362b 0%,
    var(--accent) 36%,
    #3b8a6e 62%,
    #14362b 100%
  );
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
}

.hero .lede {
  max-width: 34em;
  margin: 0;
  font-size: 15.5px;
  line-height: 2;
  color: var(--text-2);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 38px;
}

/* 首屏右侧信息牌 */

.hero-aside {
  position: relative;
  padding: 26px 26px 22px;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background:
    radial-gradient(130% 90% at 100% 0%, rgba(159, 230, 200, 0.14), transparent 58%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  box-shadow: var(--shadow);
}

[data-theme="light"] .hero-aside {
  background:
    radial-gradient(130% 90% at 100% 0%, rgba(34, 107, 83, 0.09), transparent 58%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
}

.aside-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}

.aside-note {
  display: block;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--hairline);
}

.aside-date {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.aside-title {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.25s var(--ease);
}

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

.aside-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--muted);
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}

.aside-note:hover .aside-more {
  color: var(--accent);
  gap: 11px;
}

.aside-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding-top: 20px;
  gap: 12px;
}

.aside-stat {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  min-width: 0;
}

.aside-stat + .aside-stat {
  padding-left: 12px;
  border-left: 1px solid var(--hairline);
}

.aside-stat dt {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.aside-stat dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* 首屏底部信息行 */

.hero-foot {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 44px;
  padding-bottom: 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-foot-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.hero-foot-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero-foot-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--glass-border), transparent);
}

.hero-foot-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-2);
  white-space: nowrap;
}

/* ---------- 内容区 ---------- */

.section {
  padding: 30px 0 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 6px 20px;
}

.section-eyebrow {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3.6vw, 30px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.section-count {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 4px;
}

.glass-panel {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  box-shadow: var(--shadow);
  padding: 12px 28px 26px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 2px 2px;
  border-bottom: 1px solid var(--hairline);
}

/* 笔记区：左侧分类栏 + 右侧卡片 */

.notes-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  align-items: start;
  gap: 32px;
}

.notes-side {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-panel {
  padding: 20px 20px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow-soft);
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.side-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-num {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  margin: 0 -11px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-2);
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
    border-color 0.22s var(--ease);
}

.side-link:hover {
  background: var(--glass-hover);
  color: var(--text);
}

.side-link.is-active {
  background: var(--glass-strong);
  border-color: var(--glass-border);
  color: var(--text);
}

.side-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-link.is-active .side-name::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.side-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  transition: color 0.22s var(--ease);
}

.side-link.is-active .side-count {
  color: var(--accent);
}

.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.side-empty {
  font-size: 12px;
  color: var(--muted);
}

.side-panel--cta p {
  margin: 10px 0 14px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.side-panel--cta .btn-block {
  width: 100%;
}

.notes-main {
  min-width: 0;
}

.active-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0 2px;
  font-size: 12.5px;
  color: var(--muted);
}

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

.active-filter a {
  margin-left: auto;
  color: var(--text-2);
  border-bottom: 1px solid var(--glass-border);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.active-filter a:hover {
  color: var(--text);
  border-color: var(--text-2);
}

/* 文章卡片 */

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

.note-card {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.075),
    rgba(255, 255, 255, 0.022)
  );
  backdrop-filter: blur(20px) saturate(155%);
  -webkit-backdrop-filter: blur(20px) saturate(155%);
  overflow: hidden;
  transition: transform 0.42s var(--ease), border-color 0.32s var(--ease),
    box-shadow 0.42s var(--ease);
}

[data-theme="light"] .note-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.42));
}

.note-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px 240px at 100% 0%, var(--accent-soft), transparent 72%);
  transition: opacity 0.42s var(--ease);
}

.note-card:hover {
  transform: translateY(-5px);
  border-color: var(--glass-border-strong);
  box-shadow: var(--shadow);
}

.note-card:hover::after {
  opacity: 1;
}

.note-card-link {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px 26px 20px;
}

.note-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

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

.note-cat {
  padding: 3px 9px;
  border: 1px solid rgba(159, 230, 200, 0.26);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--accent);
  white-space: nowrap;
}

[data-theme="light"] .note-cat {
  border-color: rgba(34, 107, 83, 0.2);
}

.note-card-top time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

.note-card h3 {
  margin: 0 0 10px;
  font-size: 18.5px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.015em;
  transition: color 0.25s var(--ease);
}

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

.note-card-summary {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.note-read {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.note-card-tags {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.note-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  flex: 0 0 auto;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  font-size: 12px;
  color: var(--text-2);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.note-card:hover .note-arrow {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
  transform: rotate(45deg);
}

.note-card--featured {
  grid-column: 1 / -1;
}

.note-card--featured .note-card-link {
  padding: 30px 34px 24px;
}

.note-card--featured h3 {
  max-width: 24em;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.note-card--featured .note-card-summary {
  max-width: 46em;
  font-size: 14.5px;
  -webkit-line-clamp: 2;
}

.note-cards .empty {
  grid-column: 1 / -1;
}

/* 标签 */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.tag {
  padding: 3px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.tag::before {
  content: "#";
  margin-right: 1px;
  opacity: 0.4;
}

a.tag:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.tag.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(159, 230, 200, 0.32);
}

[data-theme="light"] .tag.is-active {
  border-color: rgba(34, 107, 83, 0.28);
}

/* 空状态 */
.empty {
  padding: 74px 0 60px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

.empty .empty-title {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  color: var(--text-2);
}

.empty .btn {
  margin-top: 18px;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 44px 0 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.pagination a,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.pagination a:hover {
  background: var(--glass-strong);
  border-color: var(--glass-border);
  color: var(--text);
}

.pagination .current {
  background: var(--glass-strong);
  border-color: var(--glass-border-strong);
  color: var(--text);
}

/* 关于 */
.about-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  margin-top: 24px;
  padding: 42px 46px 44px;
}

.about-quote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.65;
  letter-spacing: -0.015em;
  color: var(--text);
}

.about-body p {
  margin: 0;
  font-size: 14px;
  line-height: 2;
  color: var(--text-2);
}

.about-body .about-meta {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 详情页 ---------- */

.article-shell {
  margin-top: 112px;
  padding: 46px 52px 40px;
}

.article-head {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--hairline);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 30px;
  font-size: 12.5px;
  color: var(--muted);
  transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}

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

.article-head h1 {
  margin: 0 0 20px;
  font-size: clamp(27px, 4.4vw, 40px);
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.article-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.article-meta .author {
  color: var(--text-2);
}

.article-actions {
  display: flex;
  gap: 8px;
  margin-top: 26px;
}

/* 阅读进度 */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(159, 230, 200, 0.6);
  transition: width 0.1s linear;
}

/* 正文 */
.prose {
  padding: 40px 0 16px;
  font-size: 16.5px;
  line-height: 1.98;
  color: var(--text-2);
}

.prose > p {
  margin: 0 0 1.55em;
}

.prose > p:first-child::first-letter {
  float: left;
  margin: 0.12em 0.12em 0 0;
  font-family: var(--serif);
  font-size: 2.7em;
  line-height: 0.92;
  color: var(--text);
}

.prose h2 {
  margin: 2.6em 0 0.85em;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}

.prose h3 {
  margin: 2em 0 0.6em;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

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

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

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

.prose ul,
.prose ol {
  margin: 0 0 1.5em;
  padding-left: 1.25em;
}

.prose li {
  margin: 0.4em 0;
}

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

.prose blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-size: 16px;
}

.prose blockquote p {
  margin: 0;
}

.prose blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.prose code {
  padding: 0.15em 0.42em;
  border-radius: 5px;
  background: var(--glass-strong);
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--text);
}

.prose pre {
  margin: 1.8em 0;
  padding: 18px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}

[data-theme="light"] .prose pre {
  background: rgba(255, 255, 255, 0.55);
}

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

.prose hr {
  width: 46px;
  height: 1px;
  margin: 3em auto;
  border: 0;
  background: var(--glass-border-strong);
}

.prose .callout {
  margin: 2em 0;
  padding: 16px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-2);
}

.prose .callout strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.article-foot {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.article-foot .tags {
  margin: 0;
  gap: 8px;
}

.article-foot .tag {
  padding: 4px 12px;
  font-size: 11px;
}

/* ---------- 评论 ---------- */

.comments {
  padding: 54px 0 10px;
}

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

.comments-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}

.comments-head .count {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.comment-form textarea,
.comment-form .input {
  width: 100%;
  min-height: 96px;
  padding: 15px 17px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.8;
  resize: vertical;
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

[data-theme="light"] .comment-form textarea,
[data-theme="light"] .comment-form .input {
  background: rgba(255, 255, 255, 0.55);
}

.comment-form textarea::placeholder,
.comment-form .input::placeholder {
  color: var(--muted);
}

.comment-form textarea:focus,
.comment-form .input:focus {
  border-color: var(--accent);
  background: var(--glass-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.comment-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.comment-form-foot .hint {
  font-size: 11.5px;
  color: var(--muted);
}

.login-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: var(--glass);
  font-size: 13.5px;
  color: var(--text-2);
}

.comment-list {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
}

.comment {
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.avatar {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 12.5px;
  font-style: italic;
}

.comment-name {
  font-size: 13px;
  color: var(--text);
}

.comment-time {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.comment-actions {
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.comment:hover .comment-actions,
.comment-actions:focus-within {
  opacity: 1;
}

.comment-actions button {
  padding: 2px 4px;
  border: 0;
  background: none;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.comment-actions button:hover {
  color: var(--danger);
}

.comment-body {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-2);
}

.comment.is-author .comment-name::after {
  content: "作者";
  margin-left: 7px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.06em;
  vertical-align: 1px;
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: 70px;
  padding: 30px 0 42px;
  border-top: 1px solid var(--hairline);
  font-size: 11.5px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-inner .spacer {
  margin-left: auto;
}

.footer-inner a {
  transition: color 0.2s var(--ease);
}

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

.footer-quote {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-2);
}

/* ---------- 入场动效 ---------- */

.reveal {
  opacity: 0;
  animation: rise 0.9s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 80ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    animation: none;
    opacity: 1;
  }
  .hero-title .line-in {
    animation: none;
    transform: none;
  }
  .hero-title em {
    animation: none;
  }
  .orb,
  .pulse-dot::after {
    animation: none;
  }
}

/* =========================================================
   Django 模板补充：消息、表单、账号页、用户菜单
   ========================================================= */

/* ---------- 用户菜单 ---------- */

.user-menu {
  position: relative;
}

.user-menu summary {
  list-style: none;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.user-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.user-chip:hover {
  background: var(--glass-strong);
  color: var(--text);
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--glass-border-strong);
  border-radius: 16px;
  background: var(--glass-strong);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: var(--shadow);
  z-index: 50;
  animation: rise 0.25s var(--ease) both;
}

.dropdown-name {
  display: block;
  padding: 8px 10px 11px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--muted);
  word-break: break-all;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.dropdown-item:hover {
  background: var(--glass-hover);
  color: var(--text);
}

/* ---------- 消息提示 ---------- */

.messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 96px;
}

.message {
  padding: 11px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
  animation: rise 0.45s var(--ease) both;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.message.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
}

.message-success {
  background: var(--accent-soft);
  border-color: rgba(159, 230, 200, 0.25);
  color: var(--accent);
}

.message-error {
  background: rgba(240, 162, 154, 0.1);
  border-color: rgba(240, 162, 154, 0.28);
  color: var(--danger);
}

.message-warning {
  background: rgba(240, 208, 154, 0.1);
  border-color: rgba(240, 208, 154, 0.28);
  color: #e8cd93;
}

[data-theme="light"] .message-warning {
  color: #8a6a2f;
}

/* ---------- 表单 ---------- */

.form-wrap {
  padding-top: 128px;
  padding-bottom: 30px;
}

.page-title {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.4;
}

.page-sub {
  margin: 0 0 34px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}

.editor-form {
  padding: 34px 36px 36px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.styled-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--text-2);
}

.input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.7;
  outline: none;
  appearance: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

[data-theme="light"] .input {
  background: rgba(255, 255, 255, 0.58);
}

.input:hover {
  border-color: var(--glass-border-strong);
}

.input:focus {
  border-color: var(--accent);
  background: var(--glass-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-area {
  min-height: 110px;
  resize: vertical;
}

textarea.input[name="content"] {
  min-height: 380px;
  font-size: 15px;
  line-height: 1.85;
}

select.input {
  background-color: rgba(255, 255, 255, 0.06);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

[data-theme="light"] select.input {
  background-color: rgba(255, 255, 255, 0.6);
}

select.input option {
  background: #12211c;
  color: #f3f6f3;
}

[data-theme="light"] select.input option {
  background: #ffffff;
  color: #10201b;
}

.help-text {
  display: block;
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}

.help-text ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.errorlist {
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--danger);
}

.form-errors {
  padding: 12px 15px;
  border: 1px solid rgba(240, 162, 154, 0.28);
  border-radius: 12px;
  background: rgba(240, 162, 154, 0.1);
  font-size: 13px;
  line-height: 1.7;
  color: var(--danger);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.form-actions .spacer {
  margin-left: auto;
}

/* ---------- 登录 / 注册 ---------- */

.auth-wrap {
  display: flex;
  justify-content: center;
  padding-top: 138px;
  padding-bottom: 40px;
}

.auth-card {
  width: 100%;
  max-width: 404px;
  padding: 38px 34px 34px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: blur(30px) saturate(165%);
  -webkit-backdrop-filter: blur(30px) saturate(165%);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.auth-card .eyebrow {
  margin-bottom: 20px;
}

.auth-sub {
  margin: 0 0 28px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.auth-alt {
  margin: 24px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.auth-alt a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

.auth-alt a:hover {
  border-bottom-color: currentColor;
}

/* ---------- 删除确认 ---------- */

.delete-card {
  max-width: 560px;
  padding-top: 150px;
  padding-bottom: 40px;
}

.delete-card h1 {
  margin: 0 0 14px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.delete-card p {
  margin: 0 0 8px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-2);
}

.delete-card .delete-target {
  margin: 22px 0 30px;
  padding: 16px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: var(--glass);
  font-size: 14px;
  color: var(--text);
}

/* ---------- 其他 ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.about {
  max-width: 620px;
  margin-top: 56px;
}

.about p {
  margin: 0;
  font-size: 14px;
  line-height: 1.95;
  color: var(--text-2);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .hero {
    padding-top: 136px;
  }

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

  .hero-main {
    max-width: 660px;
  }

  .hero-aside {
    max-width: 520px;
  }

  .notes-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .notes-side {
    position: static;
  }

  .side-panel {
    padding: 16px 18px;
  }

  .side-panel--tags,
  .side-panel--cta {
    display: none;
  }

  .side-nav {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

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

  .side-link {
    flex: 0 0 auto;
    margin: 0;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .side-link.is-active .side-name::before {
    display: none;
  }

  .side-head {
    margin-bottom: 10px;
  }
}

@media (max-width: 860px) {
  .nav a {
    padding: 6px 10px;
    font-size: 12.5px;
  }

  .header-inner {
    gap: 10px;
  }

  .brand-sub {
    display: none;
  }
}

@media (max-width: 720px) {
  .container,
  .container-wide {
    padding: 0 18px;
  }

  .site-header {
    top: 12px;
    padding: 0 12px;
  }

  .header-inner {
    height: 56px;
    padding: 0 7px 0 17px;
  }

  .brand-mark {
    font-size: 20px;
  }

  .nav {
    display: none;
  }

  .header-actions {
    gap: 5px;
    margin-left: auto;
  }

  .btn {
    height: 37px;
    padding: 0 16px;
  }

  .btn-sm {
    height: 32px;
    padding: 0 13px;
  }

  .btn-lg {
    height: 44px;
    padding: 0 22px;
  }

  .hero {
    padding: 106px 0 20px;
  }

  .hero::before {
    top: 8%;
    left: 50%;
  }

  .hero-title {
    margin-top: 26px;
    font-size: clamp(28px, 8.6vw, 44px);
    line-height: 1.14;
  }

  .hero .lede {
    font-size: 14.5px;
    line-height: 1.92;
  }

  .hero-actions {
    margin-top: 30px;
  }

  .hero-aside {
    padding: 22px 22px 18px;
    border-radius: 20px;
  }

  .aside-title {
    font-size: 17px;
  }

  .hero-foot {
    gap: 14px;
    padding-top: 34px;
    letter-spacing: 0.18em;
  }

  .hero-foot-quote {
    display: none;
  }

  .section-head {
    padding: 0 2px 16px;
  }

  .glass-panel {
    border-radius: 22px;
  }

  .note-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .note-card--featured {
    grid-column: auto;
  }

  .note-card-link,
  .note-card--featured .note-card-link {
    padding: 22px 20px 18px;
  }

  .note-card h3 {
    font-size: 17.5px;
  }

  .note-card--featured h3 {
    font-size: 20px;
  }

  .note-card--featured .note-card-summary {
    font-size: 13.5px;
    -webkit-line-clamp: 3;
  }

  .article-shell {
    margin-top: 84px;
    padding: 26px 20px 28px;
    border-radius: 22px;
  }

  .article-head {
    padding-bottom: 28px;
  }

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

  .article-actions {
    flex-wrap: wrap;
  }

  .prose {
    font-size: 16px;
    line-height: 1.92;
    padding-top: 30px;
  }

  .prose > p:first-child::first-letter {
    font-size: 2.4em;
  }

  .login-hint {
    flex-direction: column;
    align-items: flex-start;
  }

  .comment-actions {
    opacity: 1;
  }

  .about-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 28px 22px 30px;
  }

  .form-wrap {
    padding-top: 96px;
    padding-bottom: 16px;
  }

  .editor-form {
    padding: 22px 18px 24px;
  }

  textarea.input[name="content"] {
    min-height: 300px;
  }

  .auth-wrap {
    padding-top: 104px;
    padding-bottom: 20px;
  }

  .auth-card {
    padding: 28px 22px 26px;
    border-radius: 22px;
  }

  .delete-card {
    padding-top: 110px;
  }

  .messages {
    margin-top: 82px;
  }

  .user-chip {
    max-width: 84px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 10px;
  }

  .site-footer {
    margin-top: 50px;
  }
}

@media (max-width: 420px) {
  .hero-title {
    letter-spacing: -0.04em;
  }

  .aside-stats {
    gap: 8px;
  }

  .aside-stat + .aside-stat {
    padding-left: 8px;
  }

  .aside-stat dd {
    font-size: 19px;
  }

  .note-card-top {
    gap: 8px;
  }

  .note-cat {
    padding: 2px 8px;
  }
}
