/*
! tailwindcss v3.4.0 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e4e0d6;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: -apple-system, BlinkMacSystemFont, Inter, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Noto Sans SC, sans-serif;
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

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

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
[type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #a29b8e;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #a29b8e;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

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

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden] {
  display: none;
}

@font-face {
  font-family: 'Postdare Wordmark';

  src: url('../fonts/postdare-wordmark.woff2') format('woff2');

  font-style: normal;

  font-weight: 700;

  font-display: swap;
}

:root {
  --bg: #faf9f6;
  --bg-alt: #f2f0ea;
  --surface: #ffffff;
  --surface-muted: #f2f0ea;
  --hairline: #e4e0d6;
  --hairline-strong: #cbc5b8;
  --text: #17150f;
  --text-secondary: #55504a;
  --text-muted: #6b645a;
  --accent: #ab761a;
  --accent-strong: #8a5c17;
  --accent-bright: #c9911f;
  --accent-wash: rgba(201, 145, 31, 0.10);
  --shadow: none;
  --grain-opacity: 0;
}

:root.dark {
  --bg: #0a0908;
  --bg-alt: #100f0d;
  --surface: #131211;
  --surface-muted: #171513;
  --hairline: #272320;
  --hairline-strong: #3b3630;
  --text: #ece8e0;
  --text-secondary: #a8a196;
  --text-muted: #8f877c;
  --accent: #ddaa2f;
  --accent-strong: #e9c256;
  --accent-bright: #ddaa2f;
  --accent-wash: rgba(221, 170, 47, 0.12);
  --shadow: none;
  --grain-opacity: 0.35;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, Inter, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Noto Sans SC, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1;
}

/* 极轻的暗色底噪，避免纯黑发死 */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grain-opacity);
  background:
      radial-gradient(900px 480px at 15% -10%, rgba(221, 170, 47, 0.07), transparent 70%),
      radial-gradient(700px 400px at 100% 0%, rgba(221, 170, 47, 0.04), transparent 70%);
}

body > * {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, Inter, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Noto Sans SC, sans-serif;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.25;
}

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

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

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

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

code {
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.875em;
}

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
}

/* 滚动条 */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-strong) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--hairline-strong);
  border-radius: 0;
}

*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
}

.container {
  width: 100%;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}

/* ---------- 等宽小标签：本主题的签名元素 ---------- */

.mono-label {
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1;
}

.mono-label-accent {
  color: var(--accent);
}

/* 标签 + 发丝线 + 说明（参考 “发布账本 ——— 实时来自 GITHUB”） */

.rule-label {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rule-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.mono-meta {
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-bright);
  border: 1px solid var(--accent-bright);
  color: #17150f;
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--accent);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- 面板：扁平化，只保留发丝线 ---------- */

.card {
  background-color: transparent;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 1.5rem;
}

/* ---------- Logo ---------- */

/* 单色字标与金色方句点，对应 favicon 的 P + 句点。 */

.logo-link {
  min-height: 44px;
  flex-shrink: 0;
}

.logo-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.logo-wordmark {
  font-family: 'Postdare Wordmark', -apple-system, BlinkMacSystemFont, Inter, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Noto Sans SC, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  color: var(--text);
}

.logo-wordmark::after {
  content: '';
  display: inline-block;
  width: 0.166667em;
  height: 0.166667em;
  margin-left: 0.125em;
  background-color: #ddaa2f;
}

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

.nav-link {
  position: relative;
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  transition: color 0.15s ease;
}

.nav-link:hover,
  .nav-link.is-active {
  color: var(--text);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-link:hover::after,
  .nav-link.is-active::after {
  transform: scaleX(1);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 2px;
  color: var(--text-muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover {
  color: var(--accent);
  background-color: var(--accent-wash);
}

/* ---------- 标记（分类 / 标签） ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--text);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  transition: all 0.15s ease;
}

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

.chip-count {
  color: var(--text-muted);
}

/* ---------- 文章列表条目 ---------- */

.entry {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--hairline);
}

.entry:first-child {
  padding-top: 0.5rem;
}

.entry-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.entry-title a {
  color: var(--text);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.25s ease, color 0.15s ease;
}

.entry-title a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

@media (min-width: 768px) {
  .entry-title {
    font-size: 1.75rem;
  }
}

/* ---------- 首页摘要展开 / 收起 ---------- */

.post-content-preview {
  position: relative;
}

.post-content-preview-wrapper {
  max-height: 190px;
  overflow: hidden;
  position: relative;
}

.content-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 96px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.post-hidden {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.post-visible {
  max-height: none;
  opacity: 1;
}

.expand-icon {
  transition: transform 0.25s ease;
}

/* 列表中的摘要收敛掉正文的大间距 */

.entry .post-content {
  line-height: 1.75;
}

.entry .post-content p {
  margin-bottom: 0.875rem;
}

.entry .post-content h1,
  .entry .post-content h2,
  .entry .post-content h3,
  .entry .post-content h4,
  .entry .post-content h5,
  .entry .post-content h6 {
  font-size: 1.0625rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  padding-top: 0;
  border-top: 0;
}

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

input[type='text'],
  input[type='search'],
  textarea {
  background-color: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--hairline-strong) !important;
  border-radius: 0 !important;
  color: var(--text);
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  transition: border-color 0.15s ease;
}

input[type='text']:focus,
  input[type='search']:focus,
  textarea:focus {
  outline: none;
  border-bottom-color: var(--accent) !important;
  box-shadow: none !important;
}

input::-moz-placeholder, textarea::-moz-placeholder {
  color: var(--text-muted);
}

input::placeholder,
  textarea::placeholder {
  color: var(--text-muted);
}

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

.post-content {
  max-width: none;
  line-height: 1.85;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 1.0625rem;
  color: var(--text);
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content strong {
  color: var(--text);
  font-weight: 700;
}

.post-content h1,
  .post-content h2,
  .post-content h3,
  .post-content h4,
  .post-content h5,
  .post-content h6 {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, Inter, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Noto Sans SC, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: 3rem;
  margin-bottom: 1rem;
  scroll-margin-top: 6rem;
}

.post-content h1 {
  font-size: 1.875rem;
}

.post-content h2 {
  font-size: 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
}

.post-content h3 {
  font-size: 1.1875rem;
}

.post-content h4 {
  font-size: 1.0625rem;
}

.post-content h5 {
  font-size: 1rem;
}

.post-content h6 {
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.post-content ul,
  .post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
}

.post-content ul {
  list-style: none;
}

.post-content ol {
  list-style: decimal;
}

.post-content ul > li {
  position: relative;
}

/* 参考图中的短横线项目符号 */

.post-content ul > li::before {
  content: '–';
  position: absolute;
  left: -1.25rem;
  color: var(--accent);
}

.post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.post-content li > ul,
  .post-content li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 2px solid var(--accent);
  background: transparent;
  color: var(--text-secondary);
  font-style: normal;
}

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

/* 行内代码 */

.post-content code:not(.code-line) {
  background: var(--accent-wash);
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.8125em;
  color: var(--accent);
  word-break: break-word;
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-wash);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  overflow-wrap: break-word;
  transition: text-decoration-color 0.15s ease;
}

.post-content a:hover {
  text-decoration-color: var(--accent);
}

.post-content img {
  border-radius: 2px;
  border: 1px solid var(--hairline);
  margin: 2rem 0;
  max-width: 100%;
  height: auto;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
  border: 1px solid var(--hairline);
}

.post-content th,
  .post-content td {
  border: 1px solid var(--hairline);
  padding: 0.625rem 0.875rem;
  line-height: 1.6;
  text-align: left;
}

.post-content th {
  background: var(--surface-muted);
  color: var(--text);
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.post-content hr {
  margin: 3rem 0;
  border-top: 1px solid var(--hairline);
}

/* ---------- 代码块 ---------- */

figure.highlight {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mermaid {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-content .modern-code-block {
  margin: 2rem 0;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  overflow: hidden;
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  max-width: 100%;
  width: 100%;
  position: relative;
  opacity: 0;
  transition: border-color 0.2s ease;
}

.post-content .modern-code-block:hover {
  border-color: var(--hairline-strong);
}

.post-content .code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
}

.post-content .code-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-content .code-header-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-content .code-language {
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.post-content .code-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border: none;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.post-content .code-collapse-btn:hover {
  background: var(--accent-wash);
  color: var(--accent);
}

.post-content .code-collapse-btn svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.post-content .code-format-btn,
  .post-content .code-copy-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.5rem;
  border: none;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.post-content .code-format-btn:hover,
  .post-content .code-copy-btn:hover,
  .post-content .code-format-btn.active,
  .post-content .code-copy-btn.copied {
  background: var(--accent-wash);
  color: var(--accent);
}

.post-content .code-copy-btn svg {
  width: 13px;
  height: 13px;
}

.post-content .code-content {
  display: block;
  background: transparent;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.post-content .modern-code-block.is-wrapped .code-content {
  overflow-x: hidden;
}

.post-content .code-lines {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-width: 100%;
  width: -moz-max-content;
  width: max-content;
}

.post-content .modern-code-block.is-wrapped .code-lines {
  width: 100%;
  min-width: 0;
}

.post-content .code-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.post-content .modern-code-block.is-wrapped .code-row {
  width: 100%;
}

.post-content .line-number {
  display: block;
  flex-shrink: 0;
  width: 2.75rem;
  min-width: 2.75rem;
  padding: 0 0.625rem;
  text-align: right;
  color: var(--text-muted);
  opacity: 0.55;
  font-size: 12.5px;
  line-height: 1.6;
  border-right: 1px solid var(--hairline);
  background: var(--bg-alt);
  position: sticky;
  left: 0;
  z-index: 2;
  -webkit-user-select: none;
  -moz-user-select: none;
       user-select: none;
}

.post-content .code-line {
  flex: 1;
  min-width: 0;
  padding: 0 1rem;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.6;
  min-height: 1.6em;
  white-space: pre;
  word-break: normal;
}

.post-content .modern-code-block.is-wrapped .code-line {
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.post-content .code-row:first-child .line-number,
  .post-content .code-row:first-child .code-line {
  padding-top: 0.875rem;
}

.post-content .code-row:last-child .line-number,
  .post-content .code-row:last-child .code-line {
  padding-bottom: 0.875rem;
}

.post-content .code-line:hover {
  background: var(--accent-wash);
}

/* 语法高亮 token（浅色） */

.post-content .code-line .comment {
  color: #8f887c;
  font-style: italic;
}

.post-content .code-line .string {
  color: #8a5c17;
}

.post-content .code-line .number,
  .post-content .code-line .literal,
  .post-content .code-line .symbol {
  color: #8a5eb0;
}

.post-content .code-line .keyword,
  .post-content .code-line .built_in,
  .post-content .code-line .type,
  .post-content .code-line .meta {
  color: #a34a2a;
}

.post-content .code-line .attr,
  .post-content .code-line .attribute,
  .post-content .code-line .selector-tag,
  .post-content .code-line .selector-class {
  color: #1f6f7d;
}

.post-content .code-line .title,
  .post-content .code-line .function,
  .post-content .code-line .section {
  color: #35578f;
}

.post-content .code-line .punctuation,
  .post-content .code-line .operator,
  .post-content .code-line .bullet {
  color: #7d766c;
}

.post-content .code-line .strong {
  color: var(--text);
  font-weight: 700;
}

/* 语法高亮 token（深色） */

.dark .post-content .code-line .comment {
  color: #6f6961;
}

.dark .post-content .code-line .string {
  color: #d7b26a;
}

.dark .post-content .code-line .number,
  .dark .post-content .code-line .literal,
  .dark .post-content .code-line .symbol {
  color: #c9a0f0;
}

.dark .post-content .code-line .keyword,
  .dark .post-content .code-line .built_in,
  .dark .post-content .code-line .type,
  .dark .post-content .code-line .meta {
  color: #e58d6a;
}

.dark .post-content .code-line .attr,
  .dark .post-content .code-line .attribute,
  .dark .post-content .code-line .selector-tag,
  .dark .post-content .code-line .selector-class {
  color: #7fd0db;
}

.dark .post-content .code-line .title,
  .dark .post-content .code-line .function,
  .dark .post-content .code-line .section {
  color: #9fb8f0;
}

.dark .post-content .code-line .punctuation,
  .dark .post-content .code-line .operator,
  .dark .post-content .code-line .bullet {
  color: #a8a196;
}

.dark .post-content .code-line .strong {
  color: var(--text);
}

.dark .post-content .code-line span[style*='--shiki-dark'] {
  color: var(--shiki-dark) !important;
}

@media (max-width: 768px) {
  .post-content .modern-code-block {
    margin: 1.25rem 0;
  }

  .post-content .line-number {
    width: 2.25rem;
    min-width: 2.25rem;
    padding-left: 0.375rem;
    padding-right: 0.375rem;
    font-size: 12px;
  }

  .post-content .code-line {
    padding-left: 0.625rem;
    padding-right: 0.625rem;
    font-size: 12px;
  }

  .post-content .code-row:first-child .line-number,
    .post-content .code-row:first-child .code-line {
    padding-top: 0.625rem;
  }

  .post-content .code-row:last-child .line-number,
    .post-content .code-row:last-child .code-line {
    padding-bottom: 0.625rem;
  }

  .post-content .code-format-btn span,
    .post-content .code-copy-btn span {
    display: none;
  }
}

/* ---------- 右侧目录轨道（ON THIS PAGE） ---------- */

.toc-rail {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 8rem);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.toc-rail-heading {
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1;
}

.toc-nav {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  border-left: 1px solid var(--hairline);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

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

.toc-list .toc-list {
  margin: 0;
}

.toc-item {
  margin: 0;
}

.toc-item::before {
  content: none;
}

.toc-link {
  display: block;
  margin-left: -1px;
  padding: 0.3125rem 0 0.3125rem 0.875rem;
  border-left: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc-link:hover {
  color: var(--text);
  border-left-color: var(--hairline-strong);
}

.toc-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

.toc-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 层级缩进 */

.toc-level-3 .toc-link {
  padding-left: 1.625rem;
  font-size: 0.78125rem;
}

.toc-level-4 .toc-link,
  .toc-level-5 .toc-link,
  .toc-level-6 .toc-link {
  padding-left: 2.375rem;
  font-size: 0.78125rem;
}

/* 移动端目录：折叠条 */

.toc-mobile {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 2.5rem;
}

.toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  cursor: pointer;
  list-style: none;
}

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

.toc-mobile[open] summary .toc-mobile-chevron {
  transform: rotate(180deg);
}

.toc-mobile-chevron {
  transition: transform 0.2s ease;
}

.toc-mobile .toc-nav {
  padding-bottom: 0.875rem;
}

.visible {
  visibility: visible;
}

.invisible {
  visibility: hidden;
}

.collapse {
  visibility: collapse;
}

.static {
  position: static;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.sticky {
  position: sticky;
}

.bottom-8 {
  bottom: 2rem;
}

.right-8 {
  right: 2rem;
}

.top-0 {
  top: 0px;
}

.top-24 {
  top: 6rem;
}

.z-50 {
  z-index: 50;
}

.order-last {
  order: 9999;
}

.m-1 {
  margin: 0.25rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-5 {
  margin-bottom: 1.25rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-7 {
  margin-bottom: 1.75rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.ml-auto {
  margin-left: auto;
}

.mt-12 {
  margin-top: 3rem;
}

.mt-20 {
  margin-top: 5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.\!block {
  display: block !important;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.inline {
  display: inline;
}

.flex {
  display: flex;
}

.table {
  display: table;
}

.table-cell {
  display: table-cell;
}

.grid {
  display: grid;
}

.contents {
  display: contents;
}

.hidden {
  display: none;
}

.size-1 {
  width: 0.25rem;
  height: 0.25rem;
}

.h-1 {
  height: 0.25rem;
}

.h-10 {
  height: 2.5rem;
}

.h-16 {
  height: 4rem;
}

.h-3 {
  height: 0.75rem;
}

.h-3\.5 {
  height: 0.875rem;
}

.h-4 {
  height: 1rem;
}

.h-40 {
  height: 10rem;
}

.h-5 {
  height: 1.25rem;
}

.h-\[18px\] {
  height: 18px;
}

.min-h-screen {
  min-height: 100vh;
}

.w-10 {
  width: 2.5rem;
}

.w-28 {
  width: 7rem;
}

.w-3 {
  width: 0.75rem;
}

.w-3\.5 {
  width: 0.875rem;
}

.w-4 {
  width: 1rem;
}

.w-5 {
  width: 1.25rem;
}

.w-\[18px\] {
  width: 18px;
}

.w-full {
  width: 100%;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-6xl {
  max-width: 72rem;
}

.max-w-xl {
  max-width: 36rem;
}

.flex-1 {
  flex: 1 1 0%;
}

.shrink {
  flex-shrink: 1;
}

.shrink-0 {
  flex-shrink: 0;
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.resize {
  resize: both;
}

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

.flex-col {
  flex-direction: column;
}

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

.items-center {
  align-items: center;
}

.items-baseline {
  align-items: baseline;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-1\.5 {
  gap: 0.375rem;
}

.gap-10 {
  gap: 2.5rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-5 {
  gap: 1.25rem;
}

.gap-7 {
  gap: 1.75rem;
}

.gap-px {
  gap: 1px;
}

.gap-x-10 {
  -moz-column-gap: 2.5rem;
       column-gap: 2.5rem;
}

.gap-x-2 {
  -moz-column-gap: 0.5rem;
       column-gap: 0.5rem;
}

.gap-x-4 {
  -moz-column-gap: 1rem;
       column-gap: 1rem;
}

.gap-x-6 {
  -moz-column-gap: 1.5rem;
       column-gap: 1.5rem;
}

.gap-y-1 {
  row-gap: 0.25rem;
}

.gap-y-2 {
  row-gap: 0.5rem;
}

.gap-y-8 {
  row-gap: 2rem;
}

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}

.scroll-smooth {
  scroll-behavior: smooth;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-wrap {
  text-wrap: wrap;
}

.text-balance {
  text-wrap: balance;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-sm {
  border-radius: 0.125rem;
}

.border {
  border-width: 1px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-t {
  border-top-width: 1px;
}

.bg-transparent {
  background-color: transparent;
}

.object-cover {
  -o-object-fit: cover;
     object-fit: cover;
}

.p-1 {
  padding: 0.25rem;
}

.px-0 {
  padding-left: 0px;
  padding-right: 0px;
}

.px-0\.5 {
  padding-left: 0.125rem;
  padding-right: 0.125rem;
}

.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.py-16 {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.pe-1 {
  padding-inline-end: 0.25rem;
}

.pe-2 {
  padding-inline-end: 0.5rem;
}

.pe-3 {
  padding-inline-end: 0.75rem;
}

.pe-4 {
  padding-inline-end: 1rem;
}

.pe-5 {
  padding-inline-end: 1.25rem;
}

.pe-6 {
  padding-inline-end: 1.5rem;
}

.pe-7 {
  padding-inline-end: 1.75rem;
}

.pe-8 {
  padding-inline-end: 2rem;
}

.pt-5 {
  padding-top: 1.25rem;
}

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

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-\[0\.8125rem\] {
  font-size: 0.8125rem;
}

.text-\[0\.9375rem\] {
  font-size: 0.9375rem;
}

.text-\[0\.95rem\] {
  font-size: 0.95rem;
}

.text-\[2\.25rem\] {
  font-size: 2.25rem;
}

.text-\[2rem\] {
  font-size: 2rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.uppercase {
  text-transform: uppercase;
}

.lowercase {
  text-transform: lowercase;
}

.capitalize {
  text-transform: capitalize;
}

.italic {
  font-style: italic;
}

.ordinal {
  --tw-ordinal: ordinal;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}

.leading-\[1\.12\] {
  line-height: 1.12;
}

.leading-\[1\.15\] {
  line-height: 1.15;
}

.leading-\[1\.1\] {
  line-height: 1.1;
}

.leading-\[1\.85\] {
  line-height: 1.85;
}

.leading-relaxed {
  line-height: 1.625;
}

.leading-snug {
  line-height: 1.375;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.underline {
  text-decoration-line: underline;
}

.overline {
  text-decoration-line: overline;
}

.line-through {
  text-decoration-line: line-through;
}

.opacity-0 {
  opacity: 0;
}

.opacity-100 {
  opacity: 1;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-60 {
  opacity: 0.6;
}

.shadow {
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.drop-shadow {
  --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.invert {
  --tw-invert: invert(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.backdrop-blur-md {
  --tw-backdrop-blur: blur(12px);
  -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
          backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}

.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-300 {
  transition-duration: 300ms;
}

.ease-in {
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.text-balance {
  text-wrap: balance;
}

.text-theme {
  color: var(--text);
}

.text-secondary {
  color: var(--text-secondary);
}

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

.text-accent {
  color: var(--accent);
}

.bg-surface {
  background-color: var(--surface);
}

.bg-accent-wash {
  background-color: var(--accent-wash);
}

.border-hairline {
  border-color: var(--hairline);
}

.border-hairline-strong {
  border-color: var(--hairline-strong);
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.\[a-zA-Z\:_\] {
  a-z-a--z: ;
}

/* ==========================================================================
   设计令牌
   编辑体（editorial）风格：近黑底 / 纸感底、琥珀金强调色、发丝线分隔、
   等宽字体承担所有元信息（日期、标签、导航、按钮），无卡片无阴影。
   ========================================================================== */

/* ==========================================================================
   组件
   ========================================================================== */

/* ==========================================================================
   工具类
   ========================================================================== */

/* [hidden] 需要压过组件层的 display 声明 */

[hidden] {
  display: none !important;
}

/* 隐藏原主题遗留元素 */

#crt-bg-shape-1,
#crt-bg-shape-2,
#crt-sidebar,
#crt-sidebar-btn,
#crtBtnUp,
.crt-nav,
.search-form,
.widget_search {
  display: none !important;
}

/* 布局骨架 */

.main-layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

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

.main-sidebar,
.main-toc {
  display: none;
}

@media (min-width: 1024px) {
  .main-layout {
    flex-direction: row;
    gap: 4rem;
  }

  .main-toc {
    display: block;
    width: 200px;
    flex-shrink: 0;
  }
}

@media (min-width: 1280px) {
  .main-sidebar {
    display: block;
    width: 260px;
    flex-shrink: 0;
  }

  .main-toc {
    width: 220px;
  }
}

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

.hover\:border-hairline-strong:hover {
  border-color: var(--hairline-strong);
}

.group:hover .group-hover\:text-accent {
  color: var(--accent);
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sm\:flex-row {
    flex-direction: row;
  }

  .sm\:items-center {
    align-items: center;
  }

  .sm\:justify-between {
    justify-content: space-between;
  }

  .sm\:border-l {
    border-left-width: 1px;
  }

  .sm\:px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .sm\:px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .sm\:pl-6 {
    padding-left: 1.5rem;
  }

  .sm\:pl-8 {
    padding-left: 2rem;
  }

  .sm\:pr-6 {
    padding-right: 1.5rem;
  }

  .sm\:pr-8 {
    padding-right: 2rem;
  }

  .sm\:text-right {
    text-align: right;
  }
}

@media (min-width: 768px) {
  .md\:flex {
    display: flex;
  }

  .md\:hidden {
    display: none;
  }

  .md\:py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .md\:text-\[2\.5rem\] {
    font-size: 2.5rem;
  }

  .md\:text-\[2\.75rem\] {
    font-size: 2.75rem;
  }

  .md\:text-\[3\.25rem\] {
    font-size: 3.25rem;
  }

  .md\:leading-\[1\.08\] {
    line-height: 1.08;
  }
}

@media (min-width: 1024px) {
  .lg\:hidden {
    display: none;
  }
}
