/* 小胡的笔记本 MarkDownPad —— 独立站基础样式（变量沿用 httcup/tools 站点风格，深浅色自动跟随系统） */

:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --border: #d9dee5;
  --text: #16191d;
  --text-dim: #5d6672;
  --accent: #2b6cb0;
  --accent-deep: #1d4f83;
  --accent-text: #ffffff;
  --ok: #1a6a43;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 4px 12px rgb(16 24 40 / 4%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --surface: #1c2027;
    --surface-2: #21262e;
    --border: #333a44;
    --text: #e8eaed;
    --text-dim: #9aa4b2;
    --accent: #5b9bd8;
    --accent-deep: #3772ab;
    --accent-text: #0d1117;
    --ok: #6cc79b;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 12px rgb(0 0 0 / 20%);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1rem 3rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.hub-head, main, footer { max-width: 1180px; margin-inline: auto; }
.hub-head { padding: 2.75rem 0 0.5rem; }

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.9rem;
}

.brand {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.head-actions { display: flex; align-items: center; gap: 0.9rem; }

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
}

.icon-link:hover, .icon-link:focus-visible { color: var(--accent); background: var(--surface-2); }
.icon-link svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.icon-link.bookmarklet svg { width: 1.05rem; height: 1.05rem; }

.hub-head h1 {
  margin: 0;
  font-size: clamp(1.6rem, 1.15rem + 2vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.lede {
  margin: 0.7rem 0 0;
  max-width: 62ch;
  color: var(--text-dim);
  font-size: 1.02rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
  unicode-bidi: isolate;
}

[hidden] { display: none !important; }

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

.skip-link {
  position: absolute;
  inset-block-start: -100vh;
  inset-inline-start: 0.75rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus { inset-block-start: 0.75rem; }

/* 底部说明卡片 */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
  margin: 1.5rem 0 0;
}

.fact {
  padding: 0.95rem 1.1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.fact h2 { margin: 0 0 0.35rem; font-size: 0.9rem; font-weight: 600; }
.fact p { margin: 0; font-size: 0.84rem; line-height: 1.6; color: var(--text-dim); }
.fact code { font-size: 0.85em; }

footer {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}

footer p { margin: 0.35rem 0; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* 书签小窗（600×600 弹窗）下收紧页头 */

@media (max-width: 900px) {
  .hub-head { padding: 1.4rem 0 0.25rem; }
  .lede { display: none; }
  footer { margin-top: 1.5rem; padding-top: 1rem; }
  .facts { display: none; }
}
