/* ==========================================================================
   小老第的杂货铺
   设计：暖纸底 + 陶土色强调 + 衬线标题 / 无衬线正文
   特性：自动明暗、中文排版优化、手机友好、阅读进度条
   ========================================================================== */

/* ---------- 设计变量 ---------- */

:root {
  color-scheme: light dark;

  /* 底色分层：页面底色比卡片更深一档，卡片才“浮”起来 */
  --bg:        #f6f4f0;
  --bg-soft:   #efece6;
  --surface:   #fffdfb;
  --surface-2: #faf7f2;
  --ink:       #201d1a;
  --ink-2:     #4a443d;
  --muted:     #857c72;
  --line:      #e6e0d6;
  --line-soft: #efe9e0;

  /* 强调色 */
  --accent:      #b4552f;
  --accent-ink:  #8f3f1f;
  --accent-wash: #fbeae0;

  /* 代码 */
  --code-bg:   #f4efe7;
  --code-ink:  #3b332b;
  --code-line: #e4dbcd;

  /* 排版 */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC",
           "Times New Roman", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --maxw: 720px;
  --radius: 16px;

  --shadow-xs: 0 1px 1px rgba(32, 29, 26, .03);
  --shadow-sm: 0 1px 3px rgba(32, 29, 26, .05), 0 1px 2px rgba(32, 29, 26, .03);
  --shadow-md: 0 6px 20px rgba(32, 29, 26, .07);
  --shadow-lg: 0 16px 44px rgba(32, 29, 26, .11);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0f1114;
    --bg-soft:   #16181d;
    --surface:   #171a20;
    --surface-2: #1c2028;
    --ink:       #eae7e3;
    --ink-2:     #c2bdb6;
    --muted:     #8e877f;
    --line:      #272b33;
    --line-soft: #20242b;

    --accent:      #e08a63;
    --accent-ink:  #f0a884;
    --accent-wash: #2b211b;

    --code-bg:   #1c2027;
    --code-ink:  #d8d3cc;
    --code-line: #2a2f38;

    --shadow-xs: 0 1px 1px rgba(0, 0, 0, .3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, .4);
    --shadow-lg: 0 16px 44px rgba(0, 0, 0, .5);
  }
}

/* ---------- 分类配色 ---------- */

[data-cat="技术"] { --c: #3b6ea5; --cs: #edf4fb; }
[data-cat="做菜"] { --c: #c0632a; --cs: #fdf1e7; }
[data-cat="算命"] { --c: #7a5aa8; --cs: #f4eeFB; }
[data-cat="随笔"] { --c: #5f7d63; --cs: #eef4ee; }

@media (prefers-color-scheme: dark) {
  [data-cat="技术"] { --c: #7fb2e5; --cs: #1c2530; }
  [data-cat="做菜"] { --c: #e9a26a; --cs: #2b2119; }
  [data-cat="算命"] { --c: #b79ce0; --cs: #241f2e; }
  [data-cat="随笔"] { --c: #9dbf9d; --cs: #1e2620; }
}

/* ---------- 基础 ---------- */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.8;
  letter-spacing: .008em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
}

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

a { color: inherit; }

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

/* 顶部背景光晕 */
body::before {
  content: "";
  position: fixed;
  top: -220px;
  left: 50%;
  width: min(1100px, 130vw);
  height: 460px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
              color-mix(in srgb, var(--accent) 7%, transparent) 0%,
              transparent 68%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- 阅读进度条 ---------- */

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #d99a5f);
  transition: width .1s linear;
}

/* ---------- 容器 ---------- */

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px 80px;
}

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 16px 0 14px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), #cf7448);
  color: #fff;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  font-size: 14px;
}

.site-nav a {
  position: relative;
  padding: 5px 9px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 7px;
  transition: color .18s, background .18s;
}

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

.site-nav a::after {
  content: "";
  position: absolute;
  left: 9px; right: 9px; bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.site-nav a:hover::after { transform: scaleX(1); }

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

.hero {
  margin: 8px 0 26px;
  text-align: center;
}

.kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding: 3px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -.01em;
  margin: 0 0 16px;
}

.hero .lead {
  margin: 0 auto;
  max-width: 32em;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
}

.hero::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 22px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.intro {
  margin: 24px 0 30px;
  padding: 20px 22px;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: 4px 12px 12px 4px;
  box-shadow: var(--shadow-xs);
}

.intro p { margin: 0 0 10px; }
.intro p:last-child { margin-bottom: 0; }

/* ---------- 章节标题 ---------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 46px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sh-text h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: .01em;
}

.sh-text p {
  margin: 5px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.sh-note {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
}

/* ---------- 分类 Tab ---------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
  transition: transform .16s, border-color .16s, color .16s, background .16s;
}

.tab i {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--c, var(--muted));
  background: var(--cs, var(--bg-soft));
  padding: 1px 7px;
  border-radius: 999px;
  transition: color .16s, background .16s;
}

.tab:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--c, var(--accent)) 40%, var(--line));
}

.tab.is-active {
  color: #fff;
  background: var(--c, var(--accent));
  border-color: var(--c, var(--accent));
  box-shadow: var(--shadow-sm);
}

.tab.is-active i {
  color: var(--c, var(--accent));
  background: #fff;
}

/* ---------- 密排归档列表 ---------- */

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

.archive li {
  border-bottom: 1px solid var(--line-soft);
}

.archive a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 4px;
  text-decoration: none;
  color: var(--ink);
  transition: background .16s, padding-left .16s;
}

.archive a:hover {
  background: var(--surface-2);
  padding-left: 10px;
}

.archive time {
  flex: none;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.a-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.a-cat {
  flex: none;
  font-size: 11.5px;
  color: var(--c, var(--muted));
  background: var(--cs, var(--bg-soft));
  padding: 1px 8px;
  border-radius: 5px;
}

/* ---------- 文章卡片 ---------- */

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

.card {
  position: relative;
  padding: 24px 26px 22px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

/* 左侧分类色轨：常显（淡），悬停加深 */
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--c, var(--accent));
  opacity: .35;
  transition: opacity .2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--c, var(--accent)) 30%, var(--line));
}

.card:hover::before { opacity: 1; }

.card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 9px;
}

.card-top .sep { opacity: .45; }

.card time,
.post-meta time {
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

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

.cat {
  display: inline-block;
  padding: 1px 10px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.7;
  text-decoration: none;
  color: var(--c, var(--accent));
  background: var(--cs, var(--accent-wash));
  border-radius: 999px;
}

.card h2 {
  margin: 0 0 9px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .005em;
}

.card h2 a {
  text-decoration: none;
  color: var(--ink);
  background-image: linear-gradient(var(--c, var(--accent)), var(--c, var(--accent)));
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .28s ease;
}

.card h2 a:hover {
  background-size: 100% 2px;
  color: var(--c, var(--accent));
}

.card .summary {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}

/* 精选（最新一篇） */

.card--featured {
  padding: 32px 30px 28px 34px;
  background:
    linear-gradient(150deg,
      color-mix(in srgb, var(--c, var(--accent)) 7%, var(--surface)) 0%,
      var(--surface) 52%);
  border-color: color-mix(in srgb, var(--c, var(--accent)) 24%, var(--line));
  box-shadow: var(--shadow-md);
}

.card--featured h2 { font-size: 26px; }

.card--featured::before { opacity: 1; width: 4px; }

.badge {
  position: absolute;
  top: -1px;
  right: 20px;
  padding: 3px 11px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: #fff;
  background: var(--c, var(--accent));
  border-radius: 0 0 8px 8px;
}

/* 标签 */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag {
  padding: 1.5px 9px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: color .16s, border-color .16s;
}

.card:hover .tag { border-color: color-mix(in srgb, var(--c, var(--accent)) 22%, var(--line)); }

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

.post header {
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

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

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

.post h1 {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -.004em;
  margin: 0 0 16px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

.post-meta .sep { opacity: .45; }

.post > footer {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.back {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

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

/* 上一篇 / 下一篇 */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 44px;
}

.pn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 17px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}

.pn:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: var(--shadow-md);
}

.pn--next { text-align: right; }

.pn-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
}

.pn-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink);
}

/* ---------- 正文排版 ---------- */

.prose {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
  overflow-wrap: break-word;
}

/* 长网址 / 长命令不撑破布局 */
.prose a,
.prose code { overflow-wrap: anywhere; }

/* 锚点跳转不被粘性头部遮住 */
.prose h2,
.prose h3,
.prose h4 { scroll-margin-top: 76px; }

.prose > p:first-child {
  font-size: 17.5px;
  color: var(--ink-2);
}

.prose p { margin: 0 0 20px; }

.prose h2 {
  position: relative;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.5;
  margin: 46px 0 18px;
  padding-left: 15px;
}

.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .34em;
  bottom: .34em;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 25%, transparent));
}

.prose h3 {
  font-family: var(--serif);
  font-size: 19.5px;
  font-weight: 600;
  margin: 34px 0 12px;
}

.prose h4 {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 26px 0 10px;
}

.prose a {
  color: var(--accent-ink);
  text-decoration: none;
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 55%, transparent),
                                     color-mix(in srgb, var(--accent) 55%, transparent));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .2s, color .2s;
}

.prose a:hover {
  color: var(--accent);
  background-size: 100% 2px;
}

.prose strong {
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(transparent 62%,
              color-mix(in srgb, var(--accent) 16%, transparent) 62%);
  padding: 0 1px;
}

.prose em { font-style: italic; color: var(--ink-2); }

.prose ul,
.prose ol {
  margin: 0 0 20px;
  padding-left: 1.45em;
}

.prose li { margin: 7px 0; }

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

.prose blockquote {
  position: relative;
  margin: 0 0 22px;
  padding: 16px 20px 16px 46px;
  font-size: 16px;
  color: var(--ink-2);
  background: var(--bg-soft);
  border-radius: 10px;
}

.prose blockquote::before {
  content: "“";
  position: absolute;
  left: 14px;
  top: 8px;
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  font-family: var(--mono);
  font-size: .86em;
  padding: .16em .42em;
  color: var(--code-ink);
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: 5px;
  word-break: break-word;
}

.prose pre {
  margin: 0 0 24px;
  padding: 17px 19px;
  overflow-x: auto;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: 11px;
  line-height: 1.65;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

@media (prefers-color-scheme: dark) {
  .prose pre { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
}

.prose pre code {
  padding: 0;
  font-size: 13.5px;
  color: var(--code-ink);
  background: none;
  border: none;
  word-break: normal;
  white-space: pre;
}

.prose img {
  display: block;
  width: 100%;
  height: auto;
  margin: 8px 0 24px;
  border-radius: 11px;
  border: 1px solid var(--line);
}

.prose hr {
  border: none;
  height: 1px;
  margin: 40px 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* 表格 */

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 0 0 24px;
  font-size: 14.5px;
  line-height: 1.7;
  border-collapse: collapse;
}

.prose thead th {
  position: sticky;
  top: 0;
  background: var(--bg-soft);
  font-weight: 600;
  white-space: nowrap;
}

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

.prose tbody tr:nth-child(even) { background: var(--bg-soft); }
.prose tbody tr:hover { background: var(--accent-wash); }

/* ---------- 分类页 / 通用页头 ---------- */

.page-head { margin: 6px 0 26px; }

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

.page-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  margin: 0;
  letter-spacing: .01em;
}

.page-sub {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- 导航页 ---------- */

.group-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .08em;
  margin: 38px 0 15px;
}

.group-title::before {
  content: "#";
  color: var(--accent);
  margin-right: 7px;
  font-size: 15px;
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 12px;
}

.link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 17px;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}

.link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: var(--shadow-md);
}

.link-name {
  font-size: 15px;
  font-weight: 600;
}

.link-name::after {
  content: " ↗";
  font-size: 12px;
  color: var(--muted);
}

.link-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

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

.site-foot {
  margin-top: 70px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.foot-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 10px;
}

.foot-brand {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.foot-desc {
  font-size: 13px;
  color: var(--muted);
}

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  opacity: .85;
}

.foot-meta .sep { opacity: .5; }

/* ---------- 手机 ---------- */

@media (max-width: 660px) {
  body { font-size: 16px; }

  .wrap { padding: 0 17px 64px; }

  .site-head {
    padding: 12px 0 10px;
    margin-bottom: 30px;
    gap: 8px;
  }

  .brand-mark { width: 27px; height: 27px; font-size: 15px; border-radius: 8px; }
  .brand-text { font-size: 16.5px; }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; padding: 4px 8px; font-size: 13.5px; }

  .hero { text-align: left; margin-top: 4px; }
  .hero h1 { font-size: 27px; line-height: 1.3; }
  .hero .lead { font-size: 14.5px; margin: 0; max-width: none; }
  .hero::after { margin: 18px 0 0; }
  .kicker { font-size: 10.5px; letter-spacing: .18em; margin-bottom: 10px; }

  .intro { padding: 15px 16px; font-size: 14.5px; border-radius: 4px 10px 10px 4px; }

  /* Tab 在窄屏收紧，让 5 个能排成一行 */
  .tabs { gap: 5px; }
  .tab { padding: 5px 9px; font-size: 13px; gap: 5px; }
  .tab i { font-size: 10.5px; padding: 0 5px; }

  .section-head { margin: 34px 0 16px; gap: 10px; }
  .sh-text h2 { font-size: 19px; }
  .sh-text p { font-size: 12.5px; }

  .card { padding: 18px 17px 16px 21px; border-radius: 13px; }
  .card::before { top: 16px; bottom: 16px; }
  .card--featured { padding: 22px 19px 20px 23px; }
  .card h2 { font-size: 18px; }
  .card--featured h2 { font-size: 20px; }
  .card .summary { font-size: 14.5px; }

  .archive a { gap: 10px; padding: 10px 2px; }
  .archive time { font-size: 11.5px; }
  .a-title { font-size: 14px; }
  .a-cat { display: none; }

  .page-title { font-size: 24px; }

  .post h1 { font-size: 23px; }
  .prose { font-size: 16.5px; line-height: 1.85; }
  .prose > p:first-child { font-size: 17px; }
  .prose h2 { font-size: 20px; margin-top: 36px; }
  .prose h3 { font-size: 18px; }
  .prose pre { padding: 14px 15px; border-radius: 9px; }
  .prose pre code { font-size: 12.5px; }
  .prose blockquote { padding: 14px 16px 14px 40px; }
  .prose blockquote::before { font-size: 32px; left: 11px; top: 10px; }

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

  .post-nav { grid-template-columns: 1fr; }
  .pn--next { text-align: left; }
}

/* ---------- 减少动效偏好 ---------- */

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