/* 科设文档 · 纸感/墨色站点样式
   全部手写，无外部字体、无外部图片、无第三方库。 */

:root {
  --bg: #f4f0e6;
  --bg-deep: #ece6d8;
  --surface: #fffcf5;
  --surface-2: #f9f5ea;
  --ink: #20242a;
  --ink-2: #394047;
  --muted: #6b7076;
  --muted-2: #8a8f94;
  --line: #ded6c5;
  --line-strong: #c8beaa;
  --accent: #3e6a56;
  --accent-ink: #2b4c3e;
  --accent-soft: #e6ede7;
  --accent-line: #b9cdc1;
  --warn: #9a5b34;
  --warn-ink: #7d4728;
  --warn-soft: #f6ebe0;
  --warn-line: #e2cdb7;
  --code-bg: #efeade;
  --code-line: #ddd4c1;
  --shadow: 0 1px 2px rgba(32, 36, 42, 0.04), 0 10px 24px -16px rgba(32, 36, 42, 0.26);
  --shadow-hover: 0 2px 4px rgba(32, 36, 42, 0.05), 0 16px 34px -18px rgba(32, 36, 42, 0.32);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 62px;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #141a1f;
  --bg-deep: #10151a;
  --surface: #1a2229;
  --surface-2: #1e272f;
  --ink: #e6e2d8;
  --ink-2: #cfcbc0;
  --muted: #98a0a6;
  --muted-2: #7c858c;
  --line: #2a343c;
  --line-strong: #3b4750;
  --accent: #8fb9a1;
  --accent-ink: #bfdccb;
  --accent-soft: #213029;
  --accent-line: #33493d;
  --warn: #d6a177;
  --warn-ink: #e3bb9a;
  --warn-soft: #2b2420;
  --warn-line: #4a3a2c;
  --code-bg: #151d23;
  --code-line: #2a353d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 26px -18px rgba(0, 0, 0, 0.7);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.34), 0 18px 38px -20px rgba(0, 0, 0, 0.78);
}

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

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

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--bg);
  background-image: repeating-linear-gradient(0deg, rgba(32, 36, 42, 0.022) 0 1px, transparent 1px 34px);
  transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] body {
  background-image: repeating-linear-gradient(0deg, rgba(230, 226, 216, 0.018) 0 1px, transparent 1px 34px);
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin: 0;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

li + li {
  margin-top: 0.3em;
}

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

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

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 80;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
  text-decoration: none;
}

/* ---------- 通用布局 ---------- */

.shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

main {
  animation: fade-in 0.45s ease both;
}

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

@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

html.is-leaving body {
  opacity: 0;
  transition: opacity 0.14s ease;
}

html.is-leaving body * {
  transition: none !important;
}

/* ---------- 头部 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: var(--header-h);
  padding: 10px max(20px, calc((100vw - 1180px) / 2 + 40px));
  background: rgba(244, 240, 230, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.1) blur(10px);
}

[data-theme="dark"] .site-header {
  background: rgba(20, 26, 31, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent-ink);
}

.brand::before {
  content: "";
  width: 22px;
  height: 26px;
  border: 1.5px solid var(--accent);
  border-radius: 3px 3px 4px 4px;
  background:
    linear-gradient(var(--accent), var(--accent)) 5px 6px / 10px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 5px 11px / 7px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 5px 16px / 10px 2px no-repeat;
  opacity: 0.85;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}

.site-nav a {
  position: relative;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

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

.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

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

.theme-toggle::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%);
  opacity: 0.85;
}

/* ---------- 页面通用 ---------- */

.page-intro {
  padding: clamp(40px, 6vw, 72px) 0 30px;
  border-bottom: 1px solid var(--line);
  animation: rise-in 0.5s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: var(--accent-ink);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
}

.page-intro h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 12px;
}

.page-intro p {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.btn:hover {
  background: var(--surface-2);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  color: #f7f4ea;
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #f7f4ea;
}

[data-theme="dark"] .btn-primary {
  color: #131a16;
}

[data-theme="dark"] .btn-primary:hover {
  color: #10150f;
}

.btn-ghost {
  background: transparent;
}

.btn-danger {
  color: var(--warn-ink);
  border-color: var(--warn-line);
  background: var(--warn-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: nowrap;
}

.badge-level[data-level="入门"],
.article-meta[data-difficulty="入门"] .badge-level {
  color: #2f5c49;
  background: #e4ede6;
  border-color: #c8dccf;
}

.badge-level[data-level="基础"],
.article-meta[data-difficulty="基础"] .badge-level {
  color: #3f5568;
  background: #e4eaf0;
  border-color: #c7d4df;
}

.badge-level[data-level="进阶"],
.article-meta[data-difficulty="进阶"] .badge-level {
  color: #73511f;
  background: #f3e9d9;
  border-color: #e2d1b5;
}

.badge-level[data-level="深入"],
.article-meta[data-difficulty="深入"] .badge-level {
  color: #7b3f3f;
  background: #f2e2e2;
  border-color: #e1c6c6;
}

[data-theme="dark"] .badge-level[data-level="入门"],
[data-theme="dark"] .article-meta[data-difficulty="入门"] .badge-level {
  color: #a8cfb9;
  background: #22322a;
  border-color: #33493b;
}

[data-theme="dark"] .badge-level[data-level="基础"],
[data-theme="dark"] .article-meta[data-difficulty="基础"] .badge-level {
  color: #a8c2d8;
  background: #212c36;
  border-color: #33424f;
}

[data-theme="dark"] .badge-level[data-level="进阶"],
[data-theme="dark"] .article-meta[data-difficulty="进阶"] .badge-level {
  color: #d9ba8e;
  background: #2f2820;
  border-color: #463a2a;
}

[data-theme="dark"] .badge-level[data-level="深入"],
[data-theme="dark"] .article-meta[data-difficulty="深入"] .badge-level {
  color: #dba5a5;
  background: #322323;
  border-color: #4b3333;
}

.tag {
  display: inline-flex;
  padding: 0 7px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: nowrap;
}

.availability {
  display: inline-flex;
  padding: 1px 8px;
  font-size: 11.5px;
  color: var(--warn-ink);
  background: var(--warn-soft);
  border: 1px dashed var(--warn-line);
  border-radius: 4px;
  white-space: nowrap;
}

.availability[hidden] {
  display: none;
}

/* ---------- 首页 ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding: clamp(44px, 7vw, 84px) 0 clamp(36px, 5vw, 56px);
}

.hero-copy {
  animation: rise-in 0.55s ease both;
}

.hero h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.28;
  margin-bottom: 16px;
  letter-spacing: 0.005em;
}

.hero h1 .thin {
  color: var(--muted);
}

.hero-lede {
  max-width: 58ch;
  font-size: 16px;
  color: var(--ink-2);
  margin-bottom: 22px;
}

.hero-search {
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin-bottom: 18px;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.hero-search input::placeholder {
  color: var(--muted-2);
}

.hero-search button {
  padding: 0 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.hero-facts span::before {
  content: "·";
  margin-right: 6px;
  color: var(--accent);
}

.hero-facts span:first-child::before {
  content: "";
  margin: 0;
}

/* 首页右侧：建议阅读顺序，纯 CSS 绘制 */
.hero-aside {
  padding: 22px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise-in 0.6s ease both;
}

.hero-aside h2 {
  font-size: 16px;
  margin-bottom: 4px;
}

.hero-aside > p {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
}

.order-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: order;
}

.order-list li {
  position: relative;
  margin: 0;
  padding: 9px 0 9px 34px;
  font-size: 13.5px;
  color: var(--ink-2);
  counter-increment: order;
  border-top: 1px solid var(--line);
}

.order-list li::before {
  content: counter(order, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 9px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--accent);
}

.order-list li a {
  color: var(--ink-2);
}

.order-list li a:hover {
  color: var(--accent-ink);
}

/* 首页说明区 */
.home-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 clamp(36px, 5vw, 56px);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.home-note {
  padding: 22px 24px;
  background: var(--surface);
}

.home-note h2 {
  font-size: 15.5px;
  margin-bottom: 6px;
}

.home-note p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.group-section {
  padding: 30px 0 12px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 82px;
}

.group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.group-head .group-index {
  display: block;
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.group-head h2 {
  font-size: clamp(21px, 2.6vw, 26px);
}

.group-head p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.group-count {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 4px;
}

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

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 20px 20px 18px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.article-card::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  width: 32px;
  height: 3px;
  background: var(--accent);
  opacity: 0.8;
  border-radius: 0 0 3px 3px;
}

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

.article-card.is-pending {
  border-style: dashed;
  background: transparent;
  box-shadow: none;
}

.article-card.is-pending::before {
  background: var(--line-strong);
}

.article-card .card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.article-card .card-time {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted-2);
}

.article-card h3 {
  font-size: 17.5px;
  line-height: 1.5;
}

.article-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  padding-top: 4px;
}

.card-direction {
  font-size: 12px;
  color: var(--muted-2);
}

.card-direction b {
  font-weight: 400;
  color: var(--accent-ink);
}

.home-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 60px;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 文章列表页 ---------- */

.filter-bar {
  display: grid;
  gap: 12px;
  padding: 22px 0 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-row > .filter-label {
  width: 46px;
  flex: none;
  font-size: 12.5px;
  color: var(--muted);
}

.filter-chip {
  padding: 3px 11px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

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

.filter-chip[aria-pressed="true"] {
  color: #f7f4ea;
  background: var(--accent);
  border-color: var(--accent);
}

[data-theme="dark"] .filter-chip[aria-pressed="true"] {
  color: #131a16;
}

.filter-select {
  padding: 4px 10px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.filter-summary {
  padding: 10px 0 22px;
  font-size: 12.5px;
  color: var(--muted);
}

.article-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.article-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  padding: 20px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}

.article-row:hover {
  text-decoration: none;
  background: var(--surface-2);
}

.article-row.is-pending {
  background: transparent;
}

.article-row h3,
.article-row .row-title {
  font-size: 17px;
  margin-bottom: 4px;
}

.article-row p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 70ch;
}

.row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted-2);
  text-align: right;
}

.row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

/* 文章索引：系列 → 主题 → 文章 */

.list-series {
  padding: 26px 0 8px;
  border-bottom: 1px solid var(--line);
}

.list-series:first-child {
  border-top: 0;
}

.list-series-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
}

.list-series-head .eyebrow {
  margin-bottom: 4px;
}

.list-series-head h2 {
  font-size: 21px;
}

.list-series-head .group-count {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted-2);
}

.list-topic {
  padding: 6px 0 2px 16px;
  border-left: 2px solid var(--line);
}

.list-topic h3 {
  margin: 12px 0 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
}

.list-topic h3 span {
  margin-left: 6px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted-2);
}

.list-topic .article-row {
  border-bottom: 1px dashed var(--line);
}

.list-topic .article-row:last-child {
  border-bottom: 0;
}

.empty-state {
  padding: 40px 0;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

[hidden] {
  display: none !important;
}

/* ---------- 文章页 ---------- */

.page-article {
  background-image: none;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 226px;
  gap: clamp(32px, 5vw, 64px);
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px clamp(20px, 4vw, 40px) 80px;
  align-items: start;
}

.article {
  min-width: 0;
  max-width: 760px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  font-size: 12.5px;
  color: var(--muted);
}

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

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

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

.article-head {
  padding-bottom: 22px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
  animation: rise-in 0.45s ease both;
}

.article-head h1 {
  font-size: clamp(27px, 3.6vw, 37px);
  line-height: 1.36;
  margin-bottom: 12px;
}

.article-summary {
  max-width: 60ch;
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--muted);
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.reading-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}

.reading-chip {
  display: inline-flex;
  padding: 1px 8px;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.reading-chip[data-state="read"] {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.reading-chip[data-state="reading"] {
  color: var(--warn-ink);
  background: var(--warn-soft);
  border-color: var(--warn-line);
}

.reading-tools .mark-read {
  padding: 3px 10px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  cursor: pointer;
}

.reading-tools .mark-read:hover {
  background: var(--surface-2);
}

.reading-hint {
  color: var(--muted-2);
}

.article-body {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-2);
}

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

.article-body p {
  margin: 0 0 1.25em;
}

.article-body h2 {
  position: relative;
  margin: 2.2em 0 0.85em;
  padding-top: 1.15em;
  font-size: clamp(20px, 2.5vw, 25px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 92px;
}

.article-body h3 {
  margin: 1.9em 0 0.7em;
  font-size: 18px;
  scroll-margin-top: 92px;
}

.article-body h2 + h3 {
  margin-top: 1.2em;
}

.article-body h2:hover .heading-anchor,
.article-body h3:hover .heading-anchor,
.article-body h2:focus-within .heading-anchor,
.article-body h3:focus-within .heading-anchor {
  opacity: 1;
}

.heading-anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 8px;
  vertical-align: -3px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.heading-anchor:hover {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--accent-line);
  text-decoration: none;
}

.heading-anchor svg {
  width: 14px;
  height: 14px;
}

.article-body :target {
  animation: target-flash 1.4s ease;
}

@keyframes target-flash {
  0%, 30% { background: var(--accent-soft); }
  100% { background: transparent; }
}

.article-body a {
  color: var(--accent-ink);
  border-bottom: 1px solid var(--accent-line);
}

.article-body a:hover {
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

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

.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.article-body blockquote {
  margin: 1.4em 0;
  padding: 2px 18px;
  border-left: 3px solid var(--line-strong);
  color: var(--muted);
}

.article-body code {
  font-family: var(--mono);
  font-size: 0.88em;
}

.article-body :not(pre) > code {
  padding: 1px 5px;
  color: var(--ink);
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: 4px;
}

.article-body pre {
  margin: 1.5em 0;
  padding: 15px 18px;
  overflow-x: auto;
  color: var(--ink-2);
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: var(--radius-sm);
  line-height: 1.7;
  font-size: 13.5px;
  tab-size: 2;
}

.article-body pre code {
  font-size: 13.5px;
}

.article-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.6em 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.65;
}

.article-body thead {
  background: var(--surface-2);
}

.article-body th,
.article-body td {
  padding: 9px 13px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.article-body tr:nth-child(even) td {
  background: rgba(62, 106, 86, 0.035);
}

[data-theme="dark"] .article-body tr:nth-child(even) td {
  background: rgba(143, 185, 161, 0.04);
}

.article-foot {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.article-foot .prev,
.article-foot .next {
  flex: 1 1 0;
  min-width: 0;
  padding: 13px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.article-foot .next {
  text-align: right;
}

.article-foot .prev:hover,
.article-foot .next:hover {
  text-decoration: none;
  border-color: var(--line-strong);
  background: var(--surface-2);
}

/* ---------- 文章目录 ---------- */

.article-toc {
  position: sticky;
  top: calc(var(--header-h) + 26px);
  max-height: calc(100vh - var(--header-h) - 52px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-gutter: stable;
}

.article-toc::-webkit-scrollbar {
  width: 6px;
}

.article-toc::-webkit-scrollbar-track {
  background: transparent;
}

.article-toc::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 3px;
}

.article-toc::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.toc-title {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

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

.toc-list li {
  margin: 0;
}

.toc-list a {
  display: block;
  padding: 5px 8px 5px 9px;
  color: var(--muted);
  border-left: 2px solid transparent;
  text-decoration: none;
  line-height: 1.55;
  transition: color 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
}

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

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

.toc-list .toc-h3 a {
  padding-left: 22px;
  font-size: 12.5px;
}

.toc-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  text-decoration: none;
}

.toc-top::before {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.toc-top:hover {
  color: var(--ink);
  text-decoration: none;
}

.toc-inline {
  margin: 0 0 28px;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.toc-inline summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  list-style: none;
}

.toc-inline summary::-webkit-details-marker {
  display: none;
}

.toc-inline summary::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  vertical-align: 1px;
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.toc-inline[open] summary::before {
  transform: rotate(45deg);
}

.toc-inline .toc-list {
  margin-top: 10px;
}

.toc-inline .toc-list a {
  padding-block: 4px;
}

/* 阅读进度条 */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.read-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  opacity: 0.75;
  transition: width 0.1s linear;
}

/* ---------- 正文组件（figure / flow / layers / compare / note） ---------- */

.figure {
  margin: 1.8em 0;
  padding: 16px 18px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.figure-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.figure-title::before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--accent);
  flex: none;
}

.flow {
  display: flex;
  align-items: stretch;
  gap: 24px;
}

.flow-step {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.65;
}

.flow-step strong,
.flow-step b,
.flow-step .flow-title {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
  color: var(--ink);
}

.flow-step span {
  display: block;
  color: var(--muted);
}

.flow-step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -16px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
}

.flow-step:last-child::after {
  display: none;
}

.layers {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.layer {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  font-size: 13.5px;
  line-height: 1.65;
}

.layer:nth-child(2) { margin-inline: 10px; }
.layer:nth-child(3) { margin-inline: 20px; }
.layer:nth-child(4) { margin-inline: 30px; }
.layer:nth-child(5) { margin-inline: 40px; }

.layer b,
.layer strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 14px;
}

.layer span {
  display: block;
  color: var(--muted);
}

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 1.8em 0;
}

.compare-card {
  padding: 15px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.75;
}

.compare-card::before {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  margin-bottom: 10px;
  background: var(--line-strong);
}

.compare-card > :last-child {
  margin-bottom: 0;
}

.compare-card b,
.compare-card strong {
  color: var(--ink);
}

.note {
  margin: 1.7em 0;
  padding: 13px 16px 13px 15px;
  font-size: 14px;
  line-height: 1.8;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
}

.note::before {
  content: "说明";
  display: inline-block;
  margin-bottom: 5px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  background: var(--surface);
  border: 1px solid var(--accent-line);
  border-radius: 3px;
}

.note > :last-child {
  margin-bottom: 0;
}

.note-info {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.note-warn {
  background: var(--warn-soft);
  border-left-color: var(--warn);
}

.note-warn::before {
  content: "注意";
  color: var(--warn-ink);
  border-color: var(--warn-line);
}

/* ---------- 搜索页 ---------- */

.search-page {
  max-width: 860px;
}

.search-form {
  display: flex;
  gap: 10px;
  margin: 32px 0 14px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.search-form input::placeholder {
  color: var(--muted-2);
}

.search-status {
  padding-bottom: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.search-results {
  border-top: 1px solid var(--line);
}

.search-result {
  display: block;
  padding: 18px 4px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.search-result:hover,
.search-result.is-active {
  background: var(--surface-2);
  text-decoration: none;
}

.search-result:hover .result-title,
.search-result.is-active .result-title {
  color: var(--accent-ink);
}

.result-title {
  font-family: var(--serif);
  font-size: 17px;
  margin-bottom: 3px;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-bottom: 5px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.result-snippet {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

.result-snippet mark {
  padding: 0 2px;
  color: var(--ink);
  background: var(--accent-soft);
  border-radius: 2px;
}

.result-section {
  display: inline-block;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--accent-ink);
}

.search-help {
  margin-top: 34px;
  padding: 18px 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--muted);
}

.search-help h2 {
  font-size: 15px;
  margin-bottom: 6px;
}

.search-help ul {
  margin-bottom: 0;
}

kbd {
  padding: 1px 5px;
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
}

/* ---------- 学习页 ---------- */

.progress-panel {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  margin: 28px 0 38px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-right: 1px solid var(--line);
}

.stat {
  padding: 18px 20px;
}

.stat:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.stat:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--ink);
}

.stat span {
  font-size: 12px;
  color: var(--muted);
}

.recent {
  padding: 18px 22px;
}

.recent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.recent-head h2 {
  font-size: 15px;
}

.recent-head span {
  font-size: 11.5px;
  color: var(--muted-2);
}

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

.recent-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 0;
  font-size: 13.5px;
  border-top: 1px dashed var(--line);
}

.recent-list li:first-child {
  border-top: 0;
}

.recent-list a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
}

.recent-list time {
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
}

.recent-empty {
  font-size: 12.5px;
  color: var(--muted-2);
}

.overall {
  padding: 18px 22px 16px;
  border-top: 1px solid var(--line);
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.overall .bar {
  flex: 1;
  height: 6px;
}

.overall em {
  font-style: normal;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-2);
  min-width: 38px;
  text-align: right;
}

.bar {
  display: block;
  height: 5px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.bar b {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 38px 0 6px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.section-title-row h2 {
  font-size: clamp(20px, 2.6vw, 24px);
}

.section-title-row span {
  font-size: 12px;
  color: var(--muted);
}

.section-lede {
  max-width: 70ch;
  margin-bottom: 20px;
  font-size: 13.5px;
  color: var(--muted);
}

.route-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.route-card {
  padding: 22px 24px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.route-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 6px;
}

.route-no {
  display: block;
  margin-bottom: 3px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.route-head h3 {
  font-size: 19px;
}

.route-progress {
  width: 190px;
  flex: none;
  padding-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
}

.route-progress .bar {
  margin-top: 7px;
}

.route-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.route-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.route-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 9px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}

.route-step:last-child {
  border-bottom: 0;
}

.step-no {
  width: 22px;
  flex: none;
  font-family: var(--serif);
  font-size: 11.5px;
  color: var(--muted-2);
  text-align: right;
}

.step-main {
  flex: 1;
  min-width: 0;
}

.step-main a,
.step-title {
  display: block;
  color: var(--ink-2);
}

.step-main a:hover {
  color: var(--accent-ink);
}

.step-meta {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.step-state {
  flex: none;
  padding: 2px 9px;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

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

.step-state[data-state="read"] {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.step-state[data-state="reading"] {
  color: var(--warn-ink);
  background: var(--warn-soft);
  border-color: var(--warn-line);
}

.route-step.is-pending .step-main a,
.route-step.is-pending .step-title {
  color: var(--muted);
}

.step-pending {
  flex: none;
  padding: 2px 9px;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--warn-ink);
  background: var(--warn-soft);
  border: 1px dashed var(--warn-line);
  border-radius: 999px;
  cursor: pointer;
}

.route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.route-actions .btn {
  padding: 4px 11px;
  font-size: 12px;
  border-radius: 5px;
}

.custom-create {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin-bottom: 22px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}

.custom-create label {
  width: 100%;
  font-size: 12.5px;
  color: var(--muted);
}

.custom-create input {
  flex: 1;
  min-width: 220px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.custom-create .btn {
  padding: 8px 16px;
  font-size: 13px;
}

.route-card .delete-step {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  color: var(--muted-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}

.route-card .delete-step:hover {
  color: var(--warn-ink);
  background: var(--warn-soft);
  border-color: var(--warn-line);
}

.reset-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 44px 0 70px;
  padding: 20px 22px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.reset-area p {
  margin: 0;
  max-width: 62ch;
  font-size: 12.5px;
  color: var(--muted);
}

.saved-tip {
  font-size: 11.5px;
  color: var(--muted-2);
}

/* ---------- 对话框 / 提示 ---------- */

.dialog {
  width: min(480px, calc(100vw - 40px));
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
}

.dialog::backdrop {
  background: rgba(20, 24, 28, 0.42);
  backdrop-filter: blur(2px);
}

.dialog form {
  padding: 22px 24px 20px;
}

.dialog h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.dialog p {
  font-size: 13px;
  color: var(--muted);
}

.dialog input[type="text"],
.dialog input[type="search"] {
  width: 100%;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.dialog-menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
}

.dialog-menu button {
  padding: 7px 15px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
}

.dialog-menu button[value="ok"],
.dialog-menu .confirm {
  color: #f7f4ea;
  background: var(--accent);
  border-color: var(--accent);
}

[data-theme="dark"] .dialog-menu button[value="ok"],
[data-theme="dark"] .dialog-menu .confirm {
  color: #131a16;
}

.dialog-menu button[data-danger] {
  color: var(--warn-ink);
  background: var(--warn-soft);
  border-color: var(--warn-line);
}

.add-list {
  max-height: 44vh;
  overflow: auto;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.add-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 4px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}

.add-item:hover {
  background: var(--surface-2);
}

.add-item .add-meta {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
}

.add-empty {
  padding: 18px 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 90;
  max-width: min(420px, calc(100vw - 40px));
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #f7f4ea;
  background: #2a3036;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

[data-theme="dark"] .toast {
  color: #141a1f;
  background: #e6e2d8;
}

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

/* ---------- 404 ---------- */

.not-found {
  display: flex;
  align-items: flex-start;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(60px, 10vw, 120px) 0 100px;
}

.not-found .code {
  font-family: var(--serif);
  font-size: clamp(64px, 12vw, 120px);
  line-height: 0.9;
  color: var(--line-strong);
  letter-spacing: -0.04em;
}

.not-found h1 {
  font-size: clamp(24px, 3.4vw, 34px);
  margin-bottom: 12px;
}

.not-found p {
  max-width: 52ch;
  color: var(--muted);
  font-size: 14.5px;
}

.not-found .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

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

.site-footer {
  margin-top: 20px;
  padding: 24px max(20px, calc((100vw - 1180px) / 2 + 40px)) 34px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted-2);
}

.site-footer p {
  margin: 0;
}

.site-footer .footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

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

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

/* ---------- 方向 / 系列 ---------- */

.direction-section {
  margin: 0 0 52px;
}

.direction-head {
  max-width: 720px;
  margin-bottom: 10px;
}

.direction-head h2 {
  margin: 3px 0 8px;
  font-size: clamp(22px, 2.8vw, 30px);
}

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

.series-block {
  padding-top: 18px;
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.series-block:first-of-type {
  margin-top: 30px;
}

.series-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink);
}

.series-label span:last-child {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--muted);
}

.series-intro {
  margin: 0 0 8px;
  max-width: 680px;
  font-size: 12.5px;
  color: var(--muted);
}

.series-block .group-section {
  padding-top: 24px;
}

.group-head h3 {
  font-size: clamp(18px, 2.2vw, 23px);
}

.group-pending {
  padding-top: 22px;
}

.pending-note {
  margin: 10px 0 0;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}

.article-card .card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink);
}

/* ---------- 系列概览 ---------- */

.series-overview {
  padding: 14px 0 4px;
}

.series-overview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  margin-bottom: 6px;
}

.series-overview-title {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.series-overview-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
  opacity: 0.78;
}

.series-index {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 46px;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.series-index li {
  display: block;
  min-width: 0;
  height: 46px;
  margin-top: 0;
}

.series-chip {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  height: 100%;
  padding: 5px 9px;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.series-chip:hover,
.series-chip:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

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

.series-chip-name {
  min-width: 0;
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.series-chip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.series-chip-count {
  font-size: 11.5px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
}

.series-dist {
  display: inline-flex;
  width: 18px;
  height: 4px;
  flex: none;
  border-radius: 2px;
  overflow: hidden;
}

.series-dist b {
  display: block;
  height: 100%;
  min-width: 2px;
}

.series-dist b[data-level="入门"] { background: #2f5c49; }
.series-dist b[data-level="基础"] { background: #3f5568; }
.series-dist b[data-level="进阶"] { background: #73511f; }
.series-dist b[data-level="深入"] { background: #7b3f3f; }

[data-theme="dark"] .series-dist b[data-level="入门"] { background: #a8cfb9; }
[data-theme="dark"] .series-dist b[data-level="基础"] { background: #a8c2d8; }
[data-theme="dark"] .series-dist b[data-level="进阶"] { background: #d9ba8e; }
[data-theme="dark"] .series-dist b[data-level="深入"] { background: #dba5a5; }

.series-overview-detail {
  margin: 4px 0 0;
  height: 1.7em;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 1000px) {
  .series-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .series-overview-hint {
    display: none;
  }

  .series-index {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .series-index li {
    flex: 0 0 104px;
    height: 44px;
  }

  .series-chip {
    height: 100%;
  }

  .series-overview-detail {
    height: 3.4em;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* ---------- 筛选补充 ---------- */

.filter-actions {
  display: flex;
  gap: 8px;
}

.filter-clear {
  padding: 3px 11px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--warn-ink);
  background: transparent;
  border: 1px solid var(--warn-line);
  border-radius: 999px;
  cursor: pointer;
}

.filter-clear:hover {
  background: var(--warn-soft);
}

.filter-chip[aria-pressed="true"]::before {
  content: "✓ ";
  font-size: 10px;
}

.filter-bar-compact {
  padding: 16px 0 8px;
  margin-bottom: 6px;
}

.filter-bar-compact .filter-row > .filter-label {
  width: 40px;
}

/* 标签搜索与多选 */
.tag-filter {
  position: relative;
  flex: 1;
  min-width: 0;
}

.tag-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.tag-selected:empty {
  display: none;
}

.tag-selected-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  cursor: pointer;
}

.tag-selected-chip:hover {
  background: var(--surface-2);
}

.tag-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.tag-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.tag-search {
  flex: 1;
  min-width: 120px;
  padding: 5px 0;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
}

.tag-clear {
  flex: none;
  min-height: 28px;
  padding: 2px 9px;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

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

.tag-suggest {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  max-height: 220px;
  margin: 6px 0 0;
  padding: 6px;
  overflow: auto;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(24, 30, 36, 0.12);
}

.tag-suggest-item {
  min-height: 36px;
  padding: 9px 10px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
}

.tag-suggest-item:hover,
.tag-suggest-item.is-active {
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.tag-suggest-empty {
  padding: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.tag-mode-hint {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .tag-selected-chip {
    min-height: 38px;
  }

  .tag-suggest-item {
    min-height: 44px;
  }
}

.empty-hint {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- 学习路线分组与折叠 ---------- */

.route-group {
  margin: 0 0 44px;
}

.route-group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.route-group-head h2 {
  margin: 3px 0 6px;
  font-size: clamp(22px, 2.6vw, 28px);
}

.route-group-head p {
  margin: 0;
  max-width: 680px;
  font-size: 13px;
  color: var(--muted);
}

.route-group-count {
  flex: none;
  padding-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.route-group-pending .route-group-head {
  border-bottom-style: dashed;
}

.route-group-pending .route-group-count {
  color: var(--warn-ink);
}

.route-group .custom-create {
  margin-bottom: 18px;
}

.route-group .empty-state {
  padding: 26px 0;
}

.route-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: none;
}

.route-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 12px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  cursor: pointer;
}

.route-toggle:hover {
  background: var(--surface-2);
}

.route-toggle i {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.route-toggle[aria-expanded="true"] i {
  transform: rotate(225deg) translate(-1px, -1px);
}

.route-toggle-text {
  line-height: 1;
}

.route-body {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  transition: grid-template-rows 0.22s ease, opacity 0.18s ease, margin-top 0.22s ease;
}

.route-body.is-open {
  grid-template-rows: 1fr;
  margin-top: 8px;
  opacity: 1;
}

.route-body-inner {
  overflow: hidden;
  min-height: 0;
}

.route-head {
  cursor: pointer;
}

.route-card.is-open {
  border-color: var(--line-strong);
}

.route-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.route-actions {
  margin-top: 14px;
}

/* ---------- 文章左侧上下文 ---------- */

.article-layout.has-context {
  grid-template-columns: 220px minmax(0, 1fr) 226px;
  max-width: 1320px;
  gap: clamp(24px, 3.4vw, 48px);
}

.article-context {
  position: sticky;
  top: calc(var(--header-h) + 26px);
  max-height: calc(100vh - var(--header-h) - 52px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 18px;
  border-right: 1px solid var(--line);
  font-size: 13px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.article-context::-webkit-scrollbar {
  width: 6px;
}

.article-context::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 3px;
}

.context-kicker {
  margin: 0 0 5px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.context-title {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.4;
}

.context-title a {
  color: var(--ink);
}

.context-title a:hover {
  color: var(--accent-ink);
}

.context-sub {
  margin: 0 0 12px;
  font-size: 11.5px;
  color: var(--muted);
}

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

.context-item {
  margin: 0 0 1px;
}

.context-item a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--ink-2);
}

.context-item a:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
  text-decoration: none;
}

.context-item.is-current a {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}

.context-no {
  flex: none;
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.context-name {
  flex: 1;
  min-width: 0;
}

.context-meta {
  flex: none;
  font-size: 10.5px;
  color: var(--muted);
}

.context-pending-label {
  margin: 14px 0 4px;
  padding-left: 8px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  list-style: none;
}

.context-item.is-pending {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 8px;
  color: var(--muted);
}

.context-back {
  display: inline-block;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--accent-ink);
}

.context-empty {
  font-size: 12.5px;
  color: var(--muted);
}

.context-inline {
  display: none;
  margin: 0 0 26px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.context-inline summary {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--accent-ink);
  cursor: pointer;
  list-style: none;
}

.context-inline summary::-webkit-details-marker {
  display: none;
}

.context-inline summary::before {
  content: "＋";
  margin-right: 8px;
  color: var(--muted);
}

.context-inline[open] summary::before {
  content: "－";
}

.context-inline-body {
  padding: 4px 14px 16px;
  border-top: 1px solid var(--line);
}

.context-inline-body .context-title {
  font-size: 15px;
}

@media (max-width: 1180px) {
  .article-layout.has-context {
    grid-template-columns: minmax(0, 1fr) 226px;
    max-width: 1180px;
  }

  .article-context {
    display: none;
  }

  .context-inline {
    display: block;
  }
}

@media (max-width: 720px) {
  .series-label {
    font-size: 18px;
  }

  .route-group-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    gap: 32px;
  }
}

@media (max-width: 900px) {
  .article-layout,
  .article-layout.has-context {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 24px;
  }

  .article {
    max-width: none;
  }

  .article-toc {
    display: none;
  }

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

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

  .progress-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .progress-stats {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .flow {
    flex-direction: column;
    gap: 20px;
  }

  .flow-step::after {
    top: auto;
    bottom: -14px;
    right: 50%;
    transform: translateX(50%) rotate(135deg);
  }

  .compare {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-notes {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .list-series-head {
    align-items: flex-start;
  }

  .list-topic {
    padding-left: 12px;
  }

  .article-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .row-meta {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .row-badges {
    justify-content: flex-start;
  }

  .route-head {
    flex-direction: column;
    gap: 8px;
  }

  .route-head-side {
    align-items: flex-start;
  }

  .route-progress {
    width: 100%;
    padding-top: 0;
    text-align: left;
  }

  .route-step {
    gap: 9px;
  }

  .step-state,
  .step-pending {
    padding-inline: 7px;
  }

  .article-foot {
    flex-direction: column;
  }

  .article-foot .next {
    text-align: left;
  }

  .layer:nth-child(n) {
    margin-inline: 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
    gap: 8px 14px;
    padding-block: 12px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin: 0;
    gap: 2px;
    overflow-x: auto;
  }

  .site-nav a {
    padding-inline: 9px;
    white-space: nowrap;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .hero h1 {
    font-size: clamp(28px, 8vw, 36px);
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-search button {
    padding-block: 10px;
  }

  .group-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .group-count {
    padding: 0;
  }

  .filter-row > .filter-label {
    width: 100%;
  }

  .not-found {
    flex-direction: column;
    gap: 20px;
    padding-top: 64px;
  }

  .progress-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recent {
    padding: 16px;
  }

  .reset-area {
    flex-direction: column;
    align-items: flex-start;
  }

  .dialog form {
    padding: 18px 18px 16px;
  }

  .article-body {
    font-size: 15.5px;
  }

  .article-body table {
    font-size: 13.5px;
    line-height: 1.6;
  }

  .article-body th,
  .article-body td {
    padding: 8px 10px;
  }
}

@media (hover: none) {
  .heading-anchor {
    opacity: 0.55;
  }
}

/* ---------------- 网络安全访问须知与锁定态 ---------------- */

.page-notice .page-intro p + p {
  margin-top: 10px;
}

.notice-version {
  font-size: 13px;
  color: var(--muted-2);
}

.notice-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notice-status .eyebrow {
  margin-bottom: 6px;
}

.notice-status p {
  margin: 0;
  font-size: 14px;
}

.notice-return-hint {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
  word-break: break-all;
}

.notice-section {
  margin-top: 30px;
  padding: 26px clamp(20px, 3.4vw, 34px) 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notice-section .eyebrow {
  margin-bottom: 8px;
}

.notice-section h2 {
  font-size: clamp(22px, 2.6vw, 27px);
  margin-bottom: 12px;
}

.notice-section h3 {
  font-size: 16.5px;
  margin-bottom: 10px;
}

.notice-section > p,
.notice-section li {
  font-size: 14.5px;
}

.notice-law-list {
  margin: 4px 0 18px;
  padding-left: 1.2em;
}

.notice-law-list li {
  margin-bottom: 10px;
  color: var(--ink-2);
}

.notice-law-list b {
  color: var(--ink);
}

.notice-law-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.notice-law-entry span {
  font-size: 12.5px;
  color: var(--muted);
}

.notice-meter {
  margin: 16px 0;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.notice-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}

.notice-meter-head b {
  color: var(--accent-ink);
  font-weight: 600;
}

.notice-meter .bar {
  height: 7px;
  background: var(--bg);
}

.notice-confirm-step {
  margin-top: 20px;
  padding: 18px 20px 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.notice-confirm-second {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.notice-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 14px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  cursor: pointer;
}

.notice-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}

.notice-check input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.notice-message {
  min-height: 1.6em;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.notice-end {
  height: 1px;
}

/* 未确认时的锁定态：可点击，但会先进入访问须知 */
.article-card.is-security-locked,
.article-row.is-security-locked,
.search-result.is-security-locked,
.route-step.is-security-locked {
  position: relative;
}

.article-card.is-security-locked {
  border-style: dashed;
  background: var(--surface-2);
}

.article-row.is-security-locked {
  background: var(--surface-2);
}

.search-result.is-security-locked {
  background: var(--surface-2);
}

.route-step.is-security-locked {
  background: var(--warn-soft);
  border-left: 2px solid var(--warn-line);
}

.article-card.is-security-locked .card-title::after,
.article-row.is-security-locked .row-title::after,
.search-result.is-security-locked .result-title::after,
.route-step.is-security-locked .step-main a::after {
  content: "（需先阅读访问须知）";
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--warn-ink);
}

@media (max-width: 720px) {
  .notice-status {
    flex-direction: column;
    align-items: stretch;
  }

  .notice-status .btn {
    align-self: flex-start;
  }

  .notice-section {
    padding: 20px 18px 24px;
  }

  .notice-law-entry {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html.is-leaving body {
    opacity: 1;
  }
}
