/* My Secret Rainbow v7。视觉规范见 DESIGN.md。 */
/* 字体全部自托管：标题 Roboto Flex，正文 Roboto，只含拉丁字符，中文用系统字体 */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/roboto-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Flex"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(../fonts/roboto-flex-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ==========================================================================
   My Secret Rainbow · v7（全面参考 design.google）
   米白 / 近黑 · 超粗标题 · 直角 16:9 图片 · 右侧抽屉菜单
   全站只有一种底色：浅色主题整站米白，暗色主题整站近黑；不再有反色页面或反色区块（抽屉、页脚也跟随主题）
   ========================================================================== */

/* 浅色（默认跟随系统） */
:root, :root[data-theme="light"] {
	--bg: #fdfdf5;
	--fg: #10120e;
	--fg-2: #33352f;
	--muted: #6b6d65;
	--line: #10120e;
	--line-soft: #dcdcd2;
	--wash: #efefe6;
	--scrim: rgba(16, 18, 14, .35);
	--hd-line: rgba(16, 18, 14, .08);
	color-scheme: light;
}
:root[data-theme="dark"] {
	--bg: #12110c; --fg: #fdfdf5; --fg-2: #e2e2d8; --muted: #a3a39a; --line: #fdfdf5; --line-soft: #3a382f; --wash: #24231d; --scrim: rgba(0, 0, 0, .55); --hd-line: rgba(253, 253, 245, .06);
	color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) {
		--bg: #12110c; --fg: #fdfdf5; --fg-2: #e2e2d8; --muted: #a3a39a; --line: #fdfdf5; --line-soft: #3a382f; --wash: #24231d; --scrim: rgba(0, 0, 0, .55); --hd-line: rgba(253, 253, 245, .06);
		color-scheme: dark;
	}
}

:root {
	--col: clamp(760px, 55vw, 920px); /* 正文宽度随屏幕变大，字号同步放大，每行保持约 44–46 字 */
	--w-title: 650; /* 标题字重：和中文系统字体的最粗档笔画接近，英文不会显得过粗 */
	--sans: "Roboto Flex", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	--text: Roboto, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	--m: clamp(20px, 4.2vw, 60px);
	--gap: clamp(20px, 4.2vw, 60px);
	--max: 1680px;
	--ease: cubic-bezier(.2, 0, 0, 1);
	/* 悬停等小交互统一用 design.google 的 0.25s 曲线 */
	--ease-ui: cubic-bezier(0, .4, .2, 1);
	--t-ui: .25s;
	--r-img: 12px;
	--r-thumb: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; } /* 逐字动画时字距略有变化，不让它撑出横向滚动条 */
html { scroll-padding-top: 88px; }
body { background: var(--bg); color: var(--fg); font-family: var(--text); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transition: background-color .6s var(--ease), color .6s var(--ease); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { list-style: none; padding: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.chip:focus-visible { outline-color: currentColor; outline-offset: -5px; } /* 筛选行可横向滚动，外扩的焦点框会被裁切 */
.wrap { width: 100%; max-width: calc(var(--max) + var(--m) * 2); margin-inline: auto; padding-inline: var(--m); }

/* ---------- 字级 ---------- */
.d1 { font-family: var(--sans); font-size: clamp(40px, 4.4vw, 64px); line-height: 1.1; font-weight: var(--w-title); letter-spacing: -.01em; }
.d2 { font-family: var(--sans); font-size: clamp(32px, 3.4vw, 48px); line-height: 1.2; font-weight: var(--w-title); letter-spacing: -.5px; }
.d3 { font-family: var(--sans); font-size: clamp(20px, 1.7vw, 24px); line-height: 1.3; font-weight: var(--w-title); }

/* ---------- 页头 ---------- */
/* 页头分割线：不用阴影，一条始终显示的 1px 极淡细线（--hd-line）。
   design.google 这里是 Material 投影，浅色底上像一道柔和的灰边、深色底上几乎看不见；细线按这个观感取值 */
.hd { position: sticky; top: 0; z-index: 60; background: var(--bg); border-bottom: 1px solid var(--hd-line); transition: background-color .6s var(--ease), border-color .6s var(--ease); }
.hd__in { display: flex; align-items: center; gap: 32px; height: 64px; }
/* 顶栏 logo 复用线上的 Nimbus Sans Becker P Bold（与页脚大 LOGO 同一字体，@font-face 见页脚部分） */
.logo { font-family: "MSR Nimbus", "Helvetica Neue", Helvetica, Arial, var(--sans); font-size: 22px; font-weight: 400; line-height: 1; letter-spacing: 0; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { position: relative; padding: 8px 14px; font-size: 15px; font-weight: 500; }
.nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover::after, .nav a.is-on::after { transform: scaleX(1); }
.tools { display: flex; align-items: center; gap: 4px; }
.ibtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; transition: background-color var(--t-ui) var(--ease-ui); }
.ibtn:hover { background: var(--wash); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; } :root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .i-sun { display: block; } :root:not([data-theme]) .i-moon { display: none; } }

/* ---------- 右侧抽屉菜单（design.google） ---------- */
.scrim { position: fixed; inset: 0; z-index: 70; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
/* 抽屉跟随主题：浅色主题是米白底，暗色主题是近黑底；左边一条细线和页面分开 */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(50vw, 760px); display: flex; flex-direction: column; padding: 20px clamp(28px, 4vw, 60px) 32px; background: var(--bg); color: var(--fg); box-shadow: -1px 0 0 var(--line-soft); transform: translateX(100%); transition: transform .32s var(--ease); overflow-y: auto; }
.menu-open .scrim, .search-open .scrim { opacity: 1; pointer-events: auto; }
.js-motion .drawer, .js-motion .scrim { transition: none; } /* 开关动画交给 GSAP，CSS 过渡只作兜底 */
.menu-open #drawer, .search-open #search { transform: none; }
.drawer > * { flex-shrink: 0; } /* 内容比屏幕高时不压缩子元素（否则关闭按钮会被压成椭圆） */
/* 面板打开时锁住背后的页面，不让它跟着滚 */
html:has(body.menu-open), html:has(body.search-open), body.menu-open, body.search-open { overflow: hidden; }
.drawer__x { align-self: flex-end; }
/* 抽屉顶部一行：窄屏时左边补上站名（面板盖住了顶栏），右边关闭按钮；桌面只有关闭按钮 */
.drawer__bar { display: flex; justify-content: flex-end; align-items: center; }
.drawer__bar .drawer__x { align-self: center; }
.drawer__logo { display: none; }
.drawer__big { margin-top: clamp(32px, 6vh, 72px); }
.drawer__big a { display: block; width: fit-content; font-family: var(--sans); font-size: clamp(32px, 3vw, 44px); line-height: 1.3; font-weight: var(--w-title); letter-spacing: -.01em; transition: opacity var(--t-ui) var(--ease-ui); }
.drawer__big a:hover { opacity: .6; }
.drawer__big a.is-on { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .14em; }
.drawer__cols { display: grid; grid-template-columns: 2.2fr 1fr 1fr; gap: 32px; margin-top: auto; padding-top: 48px; border-top: 1px solid var(--line-soft); font-size: 14px; line-height: 1.6; }
.drawer__cols h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.drawer__cols p { color: var(--fg-2); }
.drawer__cols a { display: block; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
.drawer__cols a:hover { text-decoration-color: currentColor; }

/* ---------- 搜索面板（design.google）----------
   和抽屉同一套滑出面板 → 40px 大号输入框（左侧放大镜，底部 1px 线，聚焦时变成文字色）
   → 话题标签（实心胶囊，可多选）→ 结果：先一行“N 条结果”，再是“左标题 + 摘要、右方图”的列表 */
.sp__form { position: relative; margin-top: clamp(24px, 5vh, 56px); border-bottom: 1px solid var(--line-soft); transition: border-color var(--t-ui) var(--ease-ui); }
.sp__form:focus-within { border-color: var(--fg); }
.sp__field { display: block; }
.sp__icon { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: grid; color: var(--fg); }
.sp__input { width: 100%; padding: 20px 48px 16px 44px; border: 0; background: none; outline: none; font-family: var(--text); font-size: clamp(28px, 2.8vw, 40px); font-weight: 400; line-height: 1.2; color: var(--fg); -webkit-appearance: none; appearance: none; }
.sp__input::placeholder { color: var(--muted); }
.sp__input::-webkit-search-cancel-button { display: none; }
.sp__clear { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); transition: background-color var(--t-ui) var(--ease-ui), color var(--t-ui) var(--ease-ui); }
.sp__clear:hover { background: var(--wash); color: var(--fg); }
.sp__clear[hidden] { display: none; }
.sp__tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 24px 0 32px; border-bottom: 1px solid var(--line-soft); }
.sp__tag { height: 34px; padding: 0 16px; border-radius: 100px; background: var(--wash); font-size: 14px; font-weight: 500; line-height: 34px; color: var(--fg); transition: background-color var(--t-ui) var(--ease-ui), color var(--t-ui) var(--ease-ui); }
.sp__tag:hover { background: var(--line-soft); }
.sp__tag.is-on { background: var(--fg); color: var(--bg); }
.sp__res:empty { display: none; }
.sp__count { padding: 24px 0 8px; font-size: 15px; }
.sp__count span { margin-left: 10px; color: var(--muted); }
.sp__item { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 24px; align-items: start; padding: 24px 0; border-bottom: 1px solid var(--line-soft); }
.sp__item h3 { font-family: var(--sans); font-size: 20px; font-weight: var(--w-title); line-height: 1.3; }
.sp__item p { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp__item span { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }
.sp__item img { width: 120px; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-thumb); background: var(--wash); }
.sp__item:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.sp mark { background: none; color: inherit; box-shadow: inset 0 -.45em 0 var(--wash); }
.sp__none { padding: 24px 0; color: var(--muted); }
.sp__more { display: flex; width: 100%; margin: 24px 0 8px; }
.sp__more:disabled { opacity: .6; }
@media (max-width: 760px) { .sp__item { grid-template-columns: minmax(0, 1fr) 88px; gap: 16px; } .sp__item img { width: 88px; } .sp__item h3 { font-size: 17px; } }

/* ---------- 标签 / 按钮 ---------- */
/* 三种“小标签”，强度依次递减：
   .chip  筛选按钮（分类 / 专栏 / 项目的筛选）：1px 浅描边，只有选中项填色
   .tags  内容标签（卡片、文章页）：灰色小字，用 · 分隔，悬停才变深并加下划线 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; z-index: 2; display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 1px solid var(--line-soft); border-radius: 8px; font-size: 14px; line-height: 1; white-space: nowrap; color: var(--fg-2); transition: border-color var(--t-ui) var(--ease-ui), background-color var(--t-ui) var(--ease-ui), color var(--t-ui) var(--ease-ui); }
.chip:hover { border-color: var(--fg); color: var(--fg); }
.chip.is-on { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.tags { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
a.tag { position: relative; z-index: 2; transition: color var(--t-ui) var(--ease-ui); }
/* 分隔点放在链接框外面（绝对定位 + 不响应鼠标），悬停不带下划线，也点不到 */
a.tag + a.tag { margin-left: 20px; }
a.tag + a.tag::before { content: "·"; position: absolute; left: -12px; color: var(--muted); pointer-events: none; }
a.tag:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
/* 按钮和筛选标签同一语言：1px 浅描边，悬停才填色；只有“发送”这类主操作是实心 */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 24px; border: 1px solid var(--line-soft); border-radius: 8px; font-size: 15px; font-weight: 500; transition: background-color var(--t-ui) var(--ease-ui), color var(--t-ui) var(--ease-ui); }
.btn:hover, .btn--solid { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.btn--solid:hover { opacity: .85; }

/* ---------- 图片 ---------- */
/* 图片圆角分两档：卡片和大图 --r-img，小缩略图 --r-thumb */
.ph { position: relative; display: block; overflow: hidden; border-radius: var(--r-img); background: var(--wash); }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover .ph img, .story:hover .ph img { transform: scale(1.03); }

/* ---------- 卡片 ---------- */
.card { position: relative; }
.card__t a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__t a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease); }
.card:hover .card__t a { background-size: 100% 2px; }
.card__x { color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 竖卡（Recent）：16:9 图 → 标题 → 一两行简介 → 标签 */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px var(--gap); }
.vcard .ph { aspect-ratio: 16 / 9; }
/* 间距照 design.google 实测：图 → 标题 32px，标题 → 简介 24px，简介 → 标签 16px */
.vcard .card__t { margin-top: 32px; }
.vcard .card__x { margin-top: 24px; }
.vcard .tags { margin-top: 16px; }

/* 横卡（标签页 / 归档）：左文右方图 */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px var(--gap); }
.hcard { display: grid; grid-template-columns: minmax(0, 1fr) clamp(120px, 14vw, 200px); gap: 24px; align-items: start; }
.hcard .ph { aspect-ratio: 1; }
.hcard .card__t { font-size: 20px; }
.hcard .card__x { margin-top: 10px; }
.hcard .tags { margin-top: 10px; }

/* ---------- 区块 ---------- */
.sec { padding-top: clamp(72px, 8vw, 120px); }
.sec__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(32px, 3.5vw, 56px); }

/* ---------- 分类页头部（AI相关 / 设计 / 成长 / 专栏 共用）----------
   左边中文大字、右边英文别名，一粗一细 → 2px 横线（进场时从左画出）→ 标签筛选（一行，放不下时横向滑动） */
.ix-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: clamp(48px, 7vw, 104px) 0 clamp(12px, 1.4vw, 20px); position: relative; }
.ix-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--fg); transform: scaleX(var(--line, 1)); transform-origin: left; }
.js-motion .ix-head { --line: 0; }
.ix-head h1, .ix-en { font-size: clamp(52px, 11vw, 200px); line-height: .86; white-space: nowrap; }
.ix-head h1 { font-family: var(--sans); font-weight: var(--w-title); letter-spacing: -.015em; }
/* 右边是分类的英文别名（slug），用旧主题区块大标题的 Raleway Thin：和左边 800 的中文形成粗细对比。
   不放篇数：篇数在下面“全部”标签里已经有，放上面的话点标签时会跟着变，层级不对 */
@font-face { font-family: "MSR Raleway Thin"; src: url(../fonts/raleway_thin-webfont.woff) format("woff"); font-weight: 400; font-display: swap; }
.ix-en { font-family: "MSR Raleway Thin", "Helvetica Neue", Arial, sans-serif; font-weight: 400; letter-spacing: -.02em; text-transform: lowercase; }
.ix-filter { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: clamp(32px, 3vw, 48px); overflow-x: auto; scrollbar-width: none; }
.ix-filter::-webkit-scrollbar { display: none; }
.ix-filter .chip { flex: none; gap: 6px; }
.ix-filter .chip i { font-style: normal; font-size: 12px; opacity: .6; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .ix-filter { margin-top: 24px; margin-inline: calc(var(--m) * -1); padding: 2px var(--m); } }
/* 窄屏时英文别名单独缩小，guestbook / not found 这类长词也能和中文放在一行 */
@media (max-width: 760px) { .ix-head { flex-wrap: wrap; gap: 4px 16px; } .ix-head h1 { white-space: normal; } .ix-en { font-size: 10vw; } } /* 主题里页面标题长度不固定，放不下时英文别名换到下一行 */
/* 小屏手机（≤ 380px）：页头收紧，站名 + 三个图标放得下 */
@media (max-width: 380px) { .hd__in { gap: 8px; } .logo { font-size: 18px; } .tools { gap: 0; } }

/* ---------- 平滑滚动（Lenis 官方样式）---------- */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---------- 文章页阅读体验 ---------- */
/* 页头向下滚时收起；进度线跟着页头走，收起时移到屏幕最上方 */
.pg { position: fixed; top: 0; left: 0; right: 0; z-index: 61; height: 2px; pointer-events: none; }
.pg i { display: block; height: 100%; background: var(--fg); transform: scaleX(0); transform-origin: left; }

/* ---------- 图片淡入 ---------- */
/* 只在动效可用时生效；.js-motion 不存在时图片直接显示 */
.js-motion .ph img, .js-motion .sp__item img, .js-motion .row__th { opacity: 0; }
.js-motion .ph img.is-loaded, .js-motion .sp__item img.is-loaded, .js-motion .row__th.is-loaded { opacity: 1; }

/* ---------- 页面切换过渡（浏览器原生，不支持时照常跳转）---------- */
/* 页头不动，只有内容淡入淡出，切页不再整页闪一下 */
@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }
	.hd { view-transition-name: site-header; }
	::view-transition-group(site-header) { animation: none; }
	::view-transition-old(site-header) { display: none; }
	::view-transition-new(site-header) { animation: none; }
	::view-transition-old(root) { animation-duration: .12s; }
	::view-transition-new(root) { animation-duration: .2s; }
}

/* ---------- 进场 ---------- */
/* 进场由 motion.js（GSAP）控制。.js-motion 只在动效可用时存在；不可用时这些元素正常显示 */
.js-motion .brand__mark .js-fit, .js-motion .ix-head h1, .js-motion .ix-en { visibility: hidden; }

/* ---------- 页脚 ---------- */
/* 只有一个铺满宽度的大 LOGO（两行，各自缩放到满宽）+ 版权 / 备案一行 */
/* 页脚跟随主题，用一条细线和正文分开 */
.ft { margin-top: clamp(96px, 10vw, 160px); padding: clamp(48px, 6vw, 96px) 0 32px; border-top: 1px solid var(--line-soft); overflow: hidden; }
/* 页脚 LOGO 字体：沿用旧主题页头 logo 的 Nimbus Sans Becker P Bold（rainbow/fonts/nimbus-webfont），文件本身就是粗体，所以 font-weight 写 400，避免浏览器再加粗 */
@font-face { font-family: "MSR Nimbus"; src: url(../fonts/nimbus-webfont.woff) format("woff"); font-weight: 400; font-display: swap; }
.ft__logo { margin: 0; font-family: "MSR Nimbus", "Helvetica Neue", Helvetica, Arial, var(--sans); font-weight: 400; line-height: .84; letter-spacing: -.02em; user-select: none;
	/* 线框字：只描边不填充，和顶栏实心的小 logo 区分开 */
	color: transparent; -webkit-text-stroke: 1px var(--fg); }
@supports not (-webkit-text-stroke: 1px black) { .ft__logo { color: var(--fg); } }
.ft__logo span { display: block; width: fit-content; white-space: nowrap; }
.ft__bot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(32px, 4vw, 56px); font-size: 13px; color: var(--muted); }

@media (max-width: 1024px) {
	.grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid2 { grid-template-columns: 1fr; }
	/* 全屏抽屉：关闭按钮和顶栏的菜单按钮放在同一位置，点开、关闭不用挪手指 */
	.drawer { width: 100vw; padding: 12px var(--m) 32px; }
	.drawer__cols { grid-template-columns: 1fr 1fr; }
	.drawer__cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
	/* 窄屏：顶栏只留 logo 和三个图标，导航全部收进抽屉 */
	.nav { display: none; }
	.tools { margin-left: auto; }
	.grid3 { grid-template-columns: 1fr; gap: 48px; }
	.vcard .card__t { margin-top: 18px; }
	.hcard { grid-template-columns: minmax(0, 1fr) 104px; gap: 16px; }
	.hcard .card__t { font-size: 18px; }

	/* 窄屏抽屉：
	   顶部一行和顶栏同高（64px），左站名、右关闭，位置和顶栏完全重合；
	   菜单改成整行列表（28px、每行 56px 高、细线分隔），点按区域大；
	   底部只留一句简介和一行小链接（RSS · 网站地图 · 留言），去掉小标题 */
	#drawer { padding-top: 0; }
	.drawer__bar { justify-content: space-between; height: 64px; margin-inline: calc(var(--m) * -1); padding-inline: var(--m); border-bottom: 1px solid var(--hd-line); }
	.drawer__logo { display: block; }
	.drawer__big { margin-top: 8px; }
	.drawer__big a { width: auto; display: flex; align-items: center; min-height: 56px; font-size: 28px; line-height: 1.2; border-bottom: 1px solid var(--line-soft); }
	.drawer__big a.is-on { text-decoration-thickness: 2px; text-underline-offset: 6px; }
	.drawer__cols { display: block; margin-top: auto; padding-top: 40px; border-top: 0; }
	.drawer__cols h3 { display: none; }
	.drawer__cols > div { display: inline; }
	.drawer__cols > div:first-child { display: block; margin-bottom: 14px; }
	.drawer__cols > div:not(:first-child) a { display: inline-block; margin-right: 20px; line-height: 2; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } .rv { opacity: 1; transform: none; } }

/* ========== 各页面 ========== */

/* ===== index ===== */
/* 首页 = 品牌区 → 推荐（只在有置顶时出现）→ 文章列表（不分分类，按时间倒序）→ 加载更多 */

/* 品牌区：只有 Nimbus 站名铺满宽度（与顶栏 logo、页脚大 LOGO 同一字体），不再配介绍文字 */
.brand { padding-top: clamp(40px, 6vw, 88px); }
.brand__mark { margin: 0; font-family: "MSR Nimbus", "Helvetica Neue", Helvetica, Arial, var(--sans); font-weight: 400; line-height: .9; letter-spacing: -.02em; }
.brand__mark span { display: block; width: fit-content; white-space: nowrap; }

/* 推荐：1 则，左边超粗大标题 + 简介，右边 16:9 图（方图太高，第一屏放不下下面的文章）*/
.story { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: center; padding-top: clamp(64px, 8vw, 120px); }
.story__k { display: block; margin-bottom: 20px; font-size: 14px; font-weight: 600; }
.story .ph { aspect-ratio: 16 / 9; }
.story .card__x { margin-top: 24px; max-width: 32em; font-size: 17px; -webkit-line-clamp: 3; }
.story .tags { margin-top: 16px; font-size: 14px; }
.story .d1 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* 品牌区还在屏幕上时，顶栏小 logo 先隐藏，避免同时出现两遍站名；滚过品牌区后淡入 */
.hd .logo { transition: opacity .3s var(--ease); }
body.brand-in .hd .logo { opacity: 0; pointer-events: none; }

.feed { padding-top: clamp(40px, 5vw, 72px); }
.js-story:not(:empty) + .feed { padding-top: 72px; }
@media (max-width: 760px) {
	.story { grid-template-columns: 1fr; gap: 24px; padding-top: 48px; } .story .ph { order: -1; }
}

/* ===== category ===== */
/* 分类页（AI相关 / 设计 / 成长）
   头部与专栏统一（.ix-head / .ix-filter）：左分类名、右篇数 → 2px 横线 → 标签筛选
   列表版式按分类区分：设计 = 三栏竖卡（16:9 图在上，不显示摘要）；AI相关 / 成长 = 两栏横卡 */
.empty { padding: 48px 0; color: var(--muted); }

/* ===== column ===== */
/* 专栏 = 一份完整的索引，不分系列
   统一页面头部（专栏 / columns）· 标签筛选 · 编号 = 第几篇（最早一篇为 001）· 悬停预览封面 */
.idx { margin-top: 24px; border-top: 1px solid var(--line-soft); }
.row { position: relative; display: grid; grid-template-columns: 72px 1fr 160px 100px; gap: 24px; align-items: baseline; padding: 22px var(--m); margin-inline: calc(var(--m) * -1); border-bottom: 1px solid var(--line-soft); isolation: isolate; }
.row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); }
.row__n, .row__g, .row__d { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; transition: color .3s; }
.row__d { text-align: right; }
.row__t { font-family: var(--sans); font-size: clamp(20px, 1.9vw, 30px); font-weight: var(--w-title); line-height: 1.3; transition: transform .45s var(--ease); }
.row__th { display: none; }
@media (hover: hover) {
	.row:hover::before { transform: scaleY(1); transform-origin: top; }
	.row:hover, .row:hover .row__n, .row:hover .row__g, .row:hover .row__d { color: var(--bg); }
	.row:hover .row__t { transform: translateX(12px); }
}

.peek { position: fixed; top: 0; left: 0; z-index: 50; width: clamp(280px, 24vw, 420px); aspect-ratio: 16 / 9; pointer-events: none; overflow: hidden; border-radius: var(--r-img); opacity: 0; }
.peek img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
	.row { grid-template-columns: 40px 1fr 96px; gap: 8px 16px; align-items: center; padding-block: 16px; }
	.row__n { grid-row: 1 / span 2; }
	.row__t { font-size: 17px; }
	.row__g { grid-column: 2; grid-row: 2; font-size: 13px; }
	.row__g::after { content: " · " attr(data-d); }
	.row__d { display: none; }
	.row__th { display: block; grid-column: 3; grid-row: 1 / span 2; width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-thumb); }
	.peek { display: none; }
}
@media (hover: none) { .peek { display: none; } }
@media (prefers-reduced-motion: reduce) { .row::before, .row__t, .ix-head::after { transition: none; } }

/* ===== single ===== */
/* 文章页：design.google/library 式 —— 左对齐超粗标题、大号导语、满宽头图、自适应宽度的正文
   标题区和正文同宽（--col），左边缘对齐；宽屏时目录固定在正文左侧 */
.col, .txt { max-width: var(--col); margin-inline: auto; }
.ahead { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 4vw, 56px); }
.ahead .tags { margin-bottom: 20px; font-size: 14px; }
.ahead .tags .tag:first-child { color: var(--fg); font-weight: 600; }
.ahead__dek { margin-top: 24px; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; color: var(--fg-2); }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 32px; font-size: 14px; color: var(--muted); }
.byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.byline b { display: block; color: var(--fg); font-weight: 700; font-size: 15px; }
.hero { width: 100%; aspect-ratio: 16 / 9; max-height: min(72vh, 720px); } /* 宽屏上不让头图占满一屏 */
.hero--auto { aspect-ratio: auto; } /* 正文开头的图片按原比例显示，超过最大高度时居中裁切 */
.hero--auto img { display: block; height: auto; max-height: min(72vh, 720px); }
/* 没有头图时标题区紧跟正文，不留头图那段间距 */
.ahead + .art .toc--inline { margin-top: 0; }
.ahead + .art .body { margin-top: 32px; }
@media (min-width: 1280px) { .ahead + .art .body { margin-top: 0; } }
.body { margin-top: clamp(48px, 6vw, 80px); font-size: clamp(18px, calc(var(--col) / 46), 20px); line-height: 1.8; color: var(--fg-2); }
.body > * + * { margin-top: 1.25em; }
.body > :first-child { margin-top: 0; } /* 正文以小标题开头时，不把它的上边距带到页头下面 */
.body .intro { font-style: italic; }
.body h2 { margin-top: 2.2em; font-family: var(--sans); font-size: clamp(24px, 2vw, 29px); line-height: 1.2; font-weight: var(--w-title); color: var(--fg); }
.body h3 { margin-top: 1.8em; font-family: var(--sans); font-size: 20px; line-height: 1.3; font-weight: var(--w-title); color: var(--fg); }
.body h2 + *, .body h3 + * { margin-top: .6em; }
.body strong { color: var(--fg); }
.body a { color: var(--fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.body ul, .body ol { padding-left: 1.3em; } .body ul { list-style: disc; } .body ol { list-style: decimal; }
.body li + li { margin-top: .4em; }
.body blockquote { margin: 1.8em 0; font-family: var(--sans); font-size: clamp(26px, 2.6vw, 36px); line-height: 1.25; font-weight: var(--w-title); color: var(--fg); }
.body figure { margin: 2.4em 0; }
.body figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.body table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.body th, .body td { padding: 12px 16px 12px 0; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.body th { font-weight: 700; color: var(--fg); border-bottom: 2px solid var(--line); }
.body code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em; padding: .15em .4em; background: var(--wash); color: var(--fg); }
.body pre { padding: 20px 24px; background: var(--wash); font-size: 14px; line-height: 1.7; overflow-x: auto; }
.body pre code { padding: 0; background: none; }
.tags__l { margin-right: 16px; color: var(--fg); font-weight: 600; }
.afoot { font-size: 14px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line-soft); }

/* 目录（线上的 ToC+）：≥ 1280px 时固定在正文左侧；窄一些时折叠在正文开头 */
.art { position: relative; }
.toc { font-size: 14px; line-height: 1.5; }
.toc h2 { font-size: 13px; font-weight: 500; color: var(--muted); }
.toc a { display: block; padding: 6px 0; color: var(--muted); transition: color var(--t-ui) var(--ease-ui); }
.toc a:hover, .toc a.is-on { color: var(--fg); }
.toc a.is-on { font-weight: 600; }
.toc--side { display: none; }
.toc--inline { margin-top: clamp(32px, 4vw, 48px); padding: 4px 0; border-block: 1px solid var(--line-soft); }
.toc--inline summary { padding: 12px 0; font-size: 15px; font-weight: 500; cursor: pointer; }
.toc--inline ol { padding-bottom: 12px; }
@media (min-width: 1280px) {
	.toc--inline { display: none; }
	.toc--side { display: block; position: absolute; top: 4px; left: 0; width: calc((100% - var(--col)) / 2 - 48px); max-width: 240px; }
	.toc--side > div { position: sticky; top: 96px; }
	.toc--side { bottom: 0; }
	.toc--side ol { margin-top: 10px; padding-left: 12px; border-left: 1px solid var(--line-soft); }
}

/* ===== works ===== */
/* 头部和分类页统一（.ix-head / .ix-filter） */
.masonry { position: relative; margin-top: clamp(40px, 4.4vw, 64px); transition: height .3s var(--ease); }
.m-item { position: absolute; top: 0; left: 0; opacity: 0; transition: transform .3s var(--ease), opacity .2s; will-change: transform; }
.m-item.is-hidden { pointer-events: none; }
.js-motion .masonry, .js-motion .m-item { transition: none; } /* 动画交给 GSAP，CSS 过渡只作兜底 */
.wk { display: block; }
.wk .d3 { margin-top: 16px; font-size: 18px; }
.wk:hover .d3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ===== guestbook ===== */
.col { max-width: var(--col); margin-inline: auto; }
/* 头部和分类页统一（.ix-head）；输入框 1px 浅描边，聚焦时变成文字色 */

/* ===== tag ===== */
/* 标签页（tag.php）：顶部没有大字头部，全部标签就是页面的开头，当前标签实心高亮 → 两栏横卡
   全部标签和线上一样按篇数排序、带篇数；用安静的文字链；手机上默认折叠，当前标签排到第一个 */
.tc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding-top: clamp(32px, 4vw, 56px); font-size: 15px; line-height: 1.9; }
.tc a { color: var(--fg-2); white-space: nowrap; transition: color var(--t-ui) var(--ease-ui); }
.tc a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.tc sup { margin-left: 3px; font-size: 11px; color: var(--muted); vertical-align: super; line-height: 0; }
.tc a.is-on { padding: 0 10px; border-radius: 6px; background: var(--fg); color: var(--bg); text-decoration: none; }
.tc a.is-on sup { color: inherit; opacity: .7; }
.tc-more { display: none; margin-top: 8px; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) {
	.tc a.is-on { order: -1; }
	.tc:not(.is-open) { max-height: 152px; overflow: hidden; }
	.tc-more { display: inline-block; }
}

/* ===== 404 ===== */
/* 404（404.php）：头部和分类页统一；一句说明 + 两个去处 + 三篇最新文章，别让人停在死路上 */
.nf { margin-top: 28px; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.6; color: var(--fg-2); }
.nf__go { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ===== 列表通用 ===== */
.list-top { margin-top: clamp(40px, 4.4vw, 64px); }
.more { display: flex; justify-content: center; margin-top: 72px; }
.empty { padding: 72px 0; color: var(--muted); font-size: 17px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ===== 正文里 WordPress 输出的内容 ===== */
.body img { height: auto; border-radius: var(--r-img); }
.body .wp-caption, .body .wp-block-image { max-width: 100%; margin: 2.4em 0; }
.body .wp-caption-text, .body .wp-element-caption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.body .alignleft { float: left; margin: .4em 1.5em 1em 0; }
.body .alignright { float: right; margin: .4em 0 1em 1.5em; }
.body .aligncenter { display: block; margin-inline: auto; }
.body iframe, .body video { max-width: 100%; }
.page-intro { margin: 0 0 32px; font-size: 16px; }

/* ===== 评论（文章页、留言页共用）===== */
.page-comments { margin-top: clamp(40px, 4.4vw, 64px); }
.comments__t { margin-bottom: 24px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line-soft); }
.body .pn a { display: block; color: var(--fg); text-decoration: none; }
.pn__next { text-align: right; }
.pn span { display: block; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.pn b { display: block; font-family: var(--sans); font-size: 18px; line-height: 1.4; font-weight: var(--w-title); }
.body .pn a:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (max-width: 600px) { .pn { grid-template-columns: 1fr; gap: 24px; } .pn__next { text-align: left; } .pn > i { display: none; } }
.post-password-form { max-width: 480px; margin: 0; }
.post-password-form label { display: block; margin-bottom: 12px; font-size: 15px; }
.post-password-form input[type="password"] { display: block; width: 100%; margin-top: 8px; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 8px; background: transparent; color: var(--fg); font: inherit; outline: none; }
.post-password-form input[type="password"]:focus { border-color: var(--fg); }
.post-password-form input[type="submit"] { height: 44px; padding: 0 24px; border: 1px solid var(--fg); border-radius: 8px; background: var(--fg); color: var(--bg); font: inherit; font-size: 15px; cursor: pointer; }
.post-password-form input[type="submit"]:hover { opacity: .85; }
.comment-reply-title { margin: 0 0 12px; font-size: 15px; font-weight: 500; }
.comment-reply-title:empty { display: none; }
.comment-reply-title small { margin-left: 12px; font-size: 14px; font-weight: 400; }
.comment-reply-title small a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.comment-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; margin: 0; }
.comment-form textarea { grid-column: 1 / -1; min-height: 120px; resize: vertical; }
.comment-form .form-submit { grid-column: 3; grid-row: 2; margin: 0; }
.comment-form .comment-form-cookies-consent { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); }
.comment-form .comment-form-cookies-consent input { width: auto; }
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"] { width: 100%; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 8px; background: transparent; outline: none; font-size: 16px; line-height: 1.6; -webkit-appearance: none; appearance: none; transition: border-color var(--t-ui) var(--ease-ui); }
.comment-form ::placeholder { color: var(--muted); }
.comment-form textarea:focus, .comment-form input:focus { border-color: var(--fg); }
.comment-form .btn { height: 100%; min-height: 44px; cursor: pointer; }
.comment-list, .list { padding: 0; }
.list { margin-top: 56px; }
.msg { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 28px 0; border-top: 1px solid var(--line-soft); }
.msg .children { grid-column: 1 / -1; padding-left: 60px; }
.msg .children .msg { padding: 20px 0 0; border-top: 0; }
.av { display: block; width: 44px; height: 44px; border-radius: 50%; background: var(--wash); overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.msg__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; color: var(--muted); }
.msg__h b { font-family: var(--sans); font-size: 16px; font-weight: var(--w-title); color: var(--fg); }
.msg__h a { color: inherit; }
.msg__pending { margin-top: 6px; font-size: 14px; color: var(--muted); }
.msg__t { margin-top: 6px; font-size: 17px; line-height: 1.6; color: var(--fg-2); }
.msg__t p + p { margin-top: .6em; }
.msg__at { color: var(--muted); }
.comment-reply-link { display: inline-block; margin-top: 10px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.comment-reply-link:hover { color: var(--fg); }
.comments__nav { display: flex; justify-content: center; gap: 24px; margin-top: 48px; font-size: 14px; }

/* ===== 关于 ===== */
.who { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; margin-top: clamp(40px, 4.4vw, 64px); }
.who__img { aspect-ratio: 1; max-width: 520px; }
.who__txt p { margin-top: 20px; font-size: 18px; line-height: 1.8; color: var(--fg-2); }
.who__txt a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.who__lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(56px, 6vw, 96px); }
.who__lists ul { margin-top: 16px; border-top: 1px solid var(--line-soft); }
.who__lists li { padding: 12px 0; border-bottom: 1px solid var(--line-soft); color: var(--fg-2); }

/* ===== AI 导航 ===== */
.dir-find { margin-top: 24px; }
.dir { padding-top: clamp(56px, 6vw, 88px); scroll-margin-top: 64px; }
.dir__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--gap); margin-top: 24px; }
.dir__item a { display: block; height: 100%; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.dir__item b { display: block; font-family: var(--sans); font-size: 17px; font-weight: var(--w-title); }
.dir__item span { display: -webkit-box; overflow-wrap: anywhere; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--muted); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dir__item a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.dir__none { padding: 48px 0; color: var(--muted); }

/* ===== 网站地图 ===== */
.map { padding-top: clamp(56px, 6vw, 88px); }
.map__list { columns: 2; column-gap: var(--gap); margin-top: 24px; }
.map__list li { padding: 6px 0; break-inside: avoid; color: var(--fg-2); }
.map__list a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1024px) { .dir__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
	.comment-form { grid-template-columns: 1fr 1fr; }
	.comment-form .form-submit { grid-column: 1 / -1; grid-row: auto; }
	.comment-form .comment-form-cookies-consent { grid-row: auto; }
	.comment-form .btn { width: 100%; }
	.msg .children { padding-left: 16px; }
	.who, .who__lists, .dir__list { grid-template-columns: minmax(0, 1fr); }
	.map__list { columns: 1; }
}

/* ===== 登录时的管理栏：给吸顶页头和面板留出位置 ===== */
.admin-bar .hd { top: 32px; }
.admin-bar .drawer { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .drawer { top: 46px; }
	.admin-bar .hd { top: 0; }
}
