/* ==========================================================================
   floash.top · Linux 速查表 —— 全站样式
   零外部依赖：不使用任何 webfont / CDN / 外链图片。
   主题：默认跟随 prefers-color-scheme，可用 [data-theme] 手动覆盖。
   ========================================================================== */

/* --- 设计变量：浅色 --- */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #f2f5f4;
  --text: #11161a;
  --text-soft: #414b53;
  --muted: #6a747d;
  --border: #e0e5e3;
  --border-strong: #cbd3d0;
  --accent: #0f766e;
  --accent-hover: #0b5d56;
  --accent-soft: #e5f4f1;
  --accent-ring: rgba(15, 118, 110, 0.35);
  --danger: #b42318;
  --warn: #9a6700;
  --code-bg: #10151c;
  --code-text: #e6edf3;
  --code-border: #1e2733;
  --code-accent: #4fd1c5;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, 0.16);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC",
    Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --header-h: 60px;
  --wrap: 1340px;
}

/* --- 设计变量：深色（跟随系统） --- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1117;
    --bg-soft: #090d12;
    --surface: #151b23;
    --surface-2: #1b222b;
    --text: #e6edf3;
    --text-soft: #c3ccd6;
    --muted: #8d97a3;
    --border: #262e38;
    --border-strong: #3a434f;
    --accent: #4fd1c5;
    --accent-hover: #7ee0d6;
    --accent-soft: #10302e;
    --accent-ring: rgba(79, 209, 197, 0.4);
    --danger: #ff8b7e;
    --warn: #e3b341;
    --code-bg: #090d13;
    --code-text: #e6edf3;
    --code-border: #212a35;
    --code-accent: #4fd1c5;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  }
}

/* --- 设计变量：深色（手动指定，与上面保持一致） --- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --bg-soft: #090d12;
  --surface: #151b23;
  --surface-2: #1b222b;
  --text: #e6edf3;
  --text-soft: #c3ccd6;
  --muted: #8d97a3;
  --border: #262e38;
  --border-strong: #3a434f;
  --accent: #4fd1c5;
  --accent-hover: #7ee0d6;
  --accent-soft: #10302e;
  --accent-ring: rgba(79, 209, 197, 0.4);
  --danger: #ff8b7e;
  --warn: #e3b341;
  --code-bg: #090d13;
  --code-text: #e6edf3;
  --code-border: #212a35;
  --code-accent: #4fd1c5;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  margin: 0 0 0.5em;
  font-weight: 650;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

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

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
  color: var(--text);
  overflow-wrap: anywhere;
}

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

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  color: #fff;
  text-decoration: none;
}

.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* --- 顶部栏 --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header {
    background: var(--bg);
  }
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex: 0 0 auto;
  text-decoration: none;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 9px;
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-text small {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

/* --- 搜索 --- */
.search {
  position: relative;
  flex: 1 1 auto;
  max-width: 520px;
  margin-inline: auto;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-icon .ico {
  width: 17px;
  height: 17px;
}

.search input {
  width: 100%;
  padding: 9px 52px 9px 36px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.search-kbd {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  background: var(--surface-2);
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(66vh, 520px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 60;
}

.search-results[hidden] {
  display: none;
}

.sr-group {
  font-size: 11.5px;
  color: var(--muted);
  padding: 8px 10px 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sr-item {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.sr-item:hover,
.sr-item[aria-selected="true"] {
  background: var(--accent-soft);
  text-decoration: none;
  color: var(--text);
}

.sr-item .sr-cmd {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.sr-item .sr-desc {
  font-size: 12.8px;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.sr-item .sr-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.sr-empty {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}

.sr-foot {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding: 8px 10px 4px;
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sr-foot kbd {
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 4px;
  background: var(--surface-2);
  font-size: 10.5px;
}

/* --- 头部按钮 --- */
.header-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

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

.nav-toggle {
  display: none;
}

/* 主题图标：浅色显示月亮，深色显示太阳 */
.ico-sun {
  display: none;
}

:root[data-theme="dark"] .ico-moon {
  display: none;
}

:root[data-theme="dark"] .ico-sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico-moon {
    display: none;
  }
  :root:not([data-theme="light"]) .ico-sun {
    display: block;
  }
}

/* --- 布局 --- */
.layout {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px 20px 60px;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.content {
  min-width: 0;
  max-width: 980px;
}

.content:focus {
  outline: none;
}

/* --- 侧边栏 --- */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 44px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  font-size: 14px;
}

.site-nav ul,
.toc ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.nav-group-title {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 650;
  margin: 0 0 7px 10px;
}

.site-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text-soft);
  border-left: 2px solid transparent;
}

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

.site-nav a.is-current {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
}

.nav-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 20px;
  padding: 0 7px;
  line-height: 1.7;
  flex: 0 0 auto;
}

.site-nav a.is-current .nav-count {
  background: var(--accent-soft);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.toc {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.toc a {
  display: block;
  padding: 4px 10px;
  color: var(--muted);
  border-left: 2px solid var(--border);
  font-size: 13.2px;
  line-height: 1.5;
}

.toc a:hover {
  color: var(--text);
  border-left-color: var(--border-strong);
  text-decoration: none;
}

.toc a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

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

.page-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 26px;
}

.page-head h1 {
  font-size: clamp(25px, 3.6vw, 34px);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 16.5px;
  color: var(--text-soft);
  max-width: 72ch;
  margin-bottom: 14px;
}

.page-meta {
  font-size: 12.8px;
  color: var(--muted);
  margin: 0;
  font-family: var(--font-mono);
}

.page-meta strong {
  color: var(--accent);
}

.chip-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.chip {
  font-size: 12.8px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-soft);
  white-space: nowrap;
}

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

.section {
  margin-bottom: 46px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section > h2 {
  font-size: clamp(19px, 2.3vw, 23px);
  padding-bottom: 9px;
  border-bottom: 2px solid var(--accent-soft);
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section > h2::before {
  content: "";
  width: 4px;
  align-self: stretch;
  border-radius: 3px;
  background: var(--accent);
  flex: 0 0 auto;
  margin-top: 4px;
}

.section-intro {
  color: var(--text-soft);
  font-size: 15px;
  max-width: 74ch;
  margin-bottom: 20px;
}

/* --- 命令条目 --- */
.entry {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 14px;
  scroll-margin-top: calc(var(--header-h) + 20px);
  transition: border-color 0.15s ease;
}

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

.entry:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.entry-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.entry-cmd {
  margin: 0;
  font-size: 15.5px;
}

.entry-cmd code {
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: 2px 9px;
  font-weight: 650;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.badge {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1px 9px;
  background: var(--surface-2);
}

.entry-desc {
  margin: 0 0 4px;
  color: var(--text-soft);
  font-size: 14.6px;
  max-width: 78ch;
}

.entry-note {
  font-size: 13.4px;
  color: var(--muted);
  margin: 8px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--border-strong);
}

/* --- 代码块 --- */
.code-block {
  position: relative;
  margin: 10px 0 6px;
}

.code-block pre {
  margin: 0;
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  padding: 13px 84px 13px 15px;
  overflow-x: auto;
  font-size: 13.4px;
  line-height: 1.72;
  tab-size: 4;
}

.code-block pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

.code-block.cc-only pre {
  padding-right: 15px;
}

.copy-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  line-height: 1;
  color: #b9c4d0;
  background: #1d2733;
  border: 1px solid #2c3846;
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.copy-btn .ico {
  width: 13px;
  height: 13px;
  stroke-width: 1.9;
}

.copy-btn:hover {
  color: #fff;
  background: #26313f;
  border-color: #3b4a5c;
}

.copy-btn.is-done {
  color: var(--code-accent);
  border-color: var(--code-accent);
}

.copy-btn.is-failed {
  color: #ffb4a8;
  border-color: #7a3a33;
}

/* --- 表格 --- */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

thead th {
  background: var(--surface-2);
  font-size: 12.6px;
  font-weight: 650;
  color: var(--text-soft);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: var(--surface-2);
}

td code,
.quick-table td code {
  white-space: nowrap;
}

.quick-table td a {
  display: inline-block;
}

.quick-table td:nth-child(2) {
  color: var(--text-soft);
  min-width: 12ch;
}

.quick-group {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 22px 0 4px;
  font-weight: 650;
}

/* --- 提示块 --- */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 13px 16px;
  margin: 16px 0;
}

.callout-warn {
  border-left-color: var(--warn);
}

.callout-danger {
  border-left-color: var(--danger);
}

.callout-title {
  font-weight: 650;
  margin: 0 0 6px;
  font-size: 14.2px;
}

.callout-body {
  font-size: 14.2px;
  color: var(--text-soft);
}

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

.callout-body pre {
  margin: 8px 0;
}

/* --- 首页分区卡片 --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
  margin: 20px 0 8px;
  padding: 0;
  list-style: none;
}

.card {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

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

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.card-title {
  font-weight: 650;
  font-size: 15.5px;
}

.card-count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 20px;
  padding: 1px 8px;
  white-space: nowrap;
}

.card-desc {
  font-size: 13.6px;
  color: var(--text-soft);
  margin: 0;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 18px 0 6px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  list-style: none;
}

.stat-row li {
  font-size: 13.4px;
  color: var(--text-soft);
}

.stat-row strong {
  display: block;
  font-size: 20px;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1.3;
}

/* --- 页脚 --- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  margin-top: 20px;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 34px 20px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 28px;
}

.footer-brand {
  font-weight: 650;
  margin: 0 0 6px;
  font-size: 15px;
}

.footer-title {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 650;
  margin: 0 0 8px;
}

.footer-note {
  font-size: 13.2px;
  color: var(--text-soft);
  margin: 0 0 5px;
}

.footer-copy {
  margin-top: 10px;
}

.icp-line {
  font-size: 12.8px;
  color: var(--muted);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.footer-links a {
  font-size: 13.4px;
  color: var(--text-soft);
}

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

/* --- 响应式 --- */
@media (max-width: 1180px) {
  .layout {
    gap: 32px;
  }
}

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 18px;
  }

  .nav-toggle {
    display: grid;
  }

  .sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    display: none;
    padding: 14px 4px 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    background: var(--surface);
  }

  .sidebar.is-open {
    display: block;
  }

  .content {
    max-width: none;
  }
}

@media (max-width: 880px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
  }

  .search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-inline: 0;
  }

  .search-kbd {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15.5px;
  }

  .header-inner,
  .layout,
  .footer-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .entry {
    padding: 14px 13px;
  }

  .code-block pre {
    padding: 12px 15px 12px 13px;
    font-size: 12.6px;
  }

  .code-block.has-copy pre {
    padding-right: 74px;
    padding-top: 34px;
  }

  .entry-cmd code {
    font-size: 13.2px;
  }

  .brand-text small {
    display: none;
  }

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

@media (max-width: 380px) {
  .brand-text strong {
    font-size: 14.5px;
  }

  .copy-btn .copy-text {
    display: none;
  }

  .code-block.has-copy pre {
    padding-right: 48px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover {
    transform: none;
  }
}

/* --- 打印 --- */
@media print {
  .site-header,
  .sidebar,
  .footer-links,
  .copy-btn,
  .chip-nav,
  .search {
    display: none !important;
  }

  body {
    font-size: 11pt;
  }

  .layout,
  .content {
    display: block;
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .entry,
  .table-wrap {
    break-inside: avoid;
  }

  .code-block pre {
    background: #f5f5f5;
    color: #111;
    border-color: #ccc;
  }
}
