/* 个人门户 · 样式表
   深浅双模式：CSS 变量驱动。默认跟随系统 prefers-color-scheme，
   手动切换通过 <html data-theme="light|dark"> 覆盖并持久化。 */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1c2434;
  --text-2: #5c6575;
  --border: #e4e7ec;
  --accent: #2f7de8;
  --accent-text: #ffffff;
  --hover: #eef4fd;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0f1522;
    --surface: #18202f;
    --text: #e9edf4;
    --text-2: #98a2b3;
    --border: #27303f;
    --accent: #4f8ff0;
    --accent-text: #ffffff;
    --hover: #1e2836;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1522;
  --surface: #18202f;
  --text: #e9edf4;
  --text-2: #98a2b3;
  --border: #27303f;
  --accent: #4f8ff0;
  --accent-text: #ffffff;
  --hover: #1e2836;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

/* ===== 常驻导航条 ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }

.nav-links a, .nav-links span {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-2);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover { background: var(--hover); color: var(--text); }

.nav-links span {
  color: var(--text-2);
  opacity: 0.55;
  cursor: not-allowed;
}

/* ===== 主题切换按钮（固定右下角） ===== */
.theme-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover { transform: scale(1.08); color: var(--accent); }

.theme-toggle .icon-moon { display: none; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

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

/* ===== 主体布局 ===== */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* ===== 时钟 Hero ===== */
.hero { text-align: center; padding: 36px 0 30px; }

.clock-time {
  font-size: 64px;
  font-weight: 200;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.clock-date { font-size: 15px; color: var(--text-2); margin-top: 6px; }

/* ===== 挂件区 ===== */
.widgets {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-title { font-size: 14px; font-weight: 600; }

.cal-nav {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.cal-nav:hover { background: var(--hover); color: var(--text); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-grid .cal-dow {
  font-size: 12px;
  color: var(--text-2);
  padding: 4px 0;
}

.cal-grid .cal-day {
  font-size: 13px;
  padding: 6px 0;
  border-radius: 8px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.cal-grid .cal-day.other { color: var(--text-2); opacity: 0.45; }

.cal-grid .cal-day.has { position: relative; }
.cal-grid .cal-day.has::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.cal-grid .cal-day.today {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

.cal-grid .cal-day.today.has::after { background: var(--accent-text); }

.weather-card { display: flex; flex-direction: column; }

.weather-city { font-size: 14px; font-weight: 600; margin-bottom: 8px; }

.weather-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
  min-height: 120px;
}

.weather-body .w-temp { font-size: 30px; font-weight: 300; color: var(--text); }

.weather-body .w-desc { font-size: 13px; }

.weather-body svg { color: var(--accent); }

/* ===== 快捷入口 ===== */
.shortcuts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.shortcuts .group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.shortcuts .group h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 10px;
}

.shortcuts .items { display: flex; flex-wrap: wrap; gap: 8px; }

.shortcuts .entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--text);
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.shortcuts .entry:hover {
  border-color: var(--accent);
  background: var(--hover);
  transform: translateY(-1px);
}

.shortcuts .entry .note {
  font-size: 11px;
  color: var(--text-2);
  opacity: 0.7;
}

/* ===== 搜索区 ===== */
.search { max-width: 640px; margin: 0 auto 10px; }

.engine-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.engine-switch button {
  padding: 5px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.engine-switch button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.search-box {
  display: flex;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 5px 5px 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}

.search-box:focus-within { border-color: var(--accent); }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  min-width: 0;
}

.search-input::placeholder { color: var(--text-2); opacity: 0.8; }

.search-btn {
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 14px;
  padding: 8px 22px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.search-btn:hover { opacity: 0.9; }

/* ===== 页脚 ===== */
.footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  border-top: 1px solid var(--border);
}

/* ===== 响应式：移动端 ===== */
@media (max-width: 768px) {
  .clock-time { font-size: 44px; }
  .hero { padding: 24px 0 22px; }
  .widgets { grid-template-columns: 1fr; }
  .shortcuts { grid-template-columns: 1fr; }
  .nav-inner { gap: 14px; height: auto; padding: 10px 16px; flex-wrap: wrap; }
  .footer { justify-content: center; }
}

/* ===== 导航当前页高亮 ===== */
.nav-links a.active {
  background: var(--hover);
  color: var(--accent);
  font-weight: 600;
}

/* ===== 资讯流页 ===== */
.news-container { max-width: 860px; }

.news-head { padding: 20px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }

.news-head h1 { font-size: 26px; font-weight: 600; letter-spacing: 0.5px; }

.news-meta { font-size: 13px; color: var(--text-2); margin-top: 6px; }

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

.news-days .day-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  transition: all 0.15s ease;
}

.news-days .day-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--hover);
}

.news-days .day-chip span {
  font-size: 11px;
  opacity: 0.65;
}

.news-day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}

.news-day > summary {
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  transition: background-color 0.15s ease;
}

.news-day > summary::-webkit-details-marker { display: none; }

.news-day > summary:hover { background: var(--hover); }

.news-day > summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--text-2);
  transition: transform 0.2s ease;
  margin-left: 10px;
}

.news-day[open] > summary::after { transform: rotate(180deg); }

.news-day .day-date { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.news-day .day-count {
  font-size: 12px;
  color: var(--text-2);
  background: var(--hover);
  padding: 2px 9px;
  border-radius: 999px;
  margin-left: auto;
  margin-right: 4px;
}

.news-items { list-style: none; border-top: 1px solid var(--border); }

.news-item { padding: 15px 18px; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }

.news-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.badge-github { background: rgba(47, 125, 232, 0.12); color: var(--accent); }
.badge-hn { background: rgba(232, 84, 63, 0.14); color: #d9531e; }

.news-item-head .cat {
  font-size: 11px;
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 1px 8px;
  border-radius: 6px;
}

.news-title { font-size: 16.5px; font-weight: 600; line-height: 1.45; margin-bottom: 6px; }

.news-title a { transition: color 0.15s ease; }
.news-title a:hover { color: var(--accent); }

.news-summary { font-size: 14px; color: var(--text-2); line-height: 1.65; }

.news-item-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--text-2);
  flex-wrap: wrap;
}

.news-orig-title {
  flex: 1;
  min-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.75;
}

.news-item-foot .meta { font-variant-numeric: tabular-nums; opacity: 0.8; white-space: nowrap; }

.news-item-foot .origin { color: var(--accent); white-space: nowrap; font-weight: 500; }
.news-item-foot .origin:hover { text-decoration: underline; }

.news-empty { text-align: center; color: var(--text-2); padding: 60px 0; font-size: 14px; }

@media (max-width: 768px) {
  .news-head h1 { font-size: 22px; }
  .news-item { padding: 13px 14px; }
  .news-day > summary { padding: 12px 14px; }
  .news-title { font-size: 15.5px; }
  .news-orig-title { display: none; }
}

/* ==================== M3 · 观点陈列 ==================== */

:root { --cat-agent: #7c4ddb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --cat-agent: #b28aff; } }
:root[data-theme="dark"] { --cat-agent: #b28aff; }

.views-container { max-width: 860px; }

.views-head { padding: 10px 0 0; }
.views-head h1 { font-size: 26px; }
.views-intro { color: var(--text-2); font-size: 14px; margin-top: 6px; line-height: 1.7; }

.views-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 18px;
}

.views-cats { display: flex; gap: 8px; flex-wrap: wrap; }

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.cat-chip span { font-size: 11px; opacity: 0.7; }
.cat-chip.active span { opacity: 0.85; }

.tpl-open {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tpl-open:hover, .tpl-open.active { border-color: var(--accent); color: var(--accent); }

.tpl-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.tpl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.tpl-note { font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; line-height: 1.7; }
.tpl-note code { background: var(--hover); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
.tpl-body {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
}
.tpl-copy {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.tpl-copy:hover { background: var(--hover); }

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

.view-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.view-top { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }

.view-cat {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 6px;
  background: rgba(47, 125, 232, 0.12);
  color: var(--accent);
}
.view-cat[data-cat="agent"] { background: rgba(139, 92, 246, 0.15); color: var(--cat-agent); }

.view-date { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.view-demo {
  margin-left: auto;
  font-size: 11px;
  color: #d9531e;
  background: rgba(232, 84, 63, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
}

.view-title { font-size: 19px; line-height: 1.45; font-weight: 600; margin-bottom: 8px; }
.view-summary { font-size: 14.5px; color: var(--text-2); line-height: 1.7; }

.view-body-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.32s ease; }
.view-card.open .view-body-wrap { grid-template-rows: 1fr; }
.view-body { overflow: hidden; min-height: 0; font-size: 15px; line-height: 1.75; }
.view-body > *:first-child { margin-top: 14px; }

.view-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
.view-toggle:hover { text-decoration: underline; }
.view-toggle .arrow { display: inline-block; transition: transform 0.25s ease; }
.view-card.open .view-toggle .arrow { transform: rotate(180deg); }

.view-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.view-tag { font-size: 11.5px; color: var(--text-2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 6px; }

.views-empty { text-align: center; color: var(--text-2); padding: 60px 20px; font-size: 14px; line-height: 1.9; }
.views-empty code { background: var(--hover); padding: 1px 5px; border-radius: 4px; }

/* ==================== M3 · 每日记录 ==================== */

.log-container { max-width: 1000px; }

.log-head { padding: 10px 0 0; }
.log-head h1 { font-size: 26px; }
.log-meta { font-size: 13px; color: var(--text-2); margin: 6px 0 18px; }

.heatmap-card { padding: 16px 18px 11px; margin-bottom: 16px; }
.heatmap-scroll { overflow-x: auto; padding-bottom: 4px; }
.heatmap { display: flex; gap: 6px; min-width: max-content; }

.hm-weekdays {
  display: grid;
  grid-template-rows: repeat(7, 11px);
  gap: 3px;
  width: 14px;
  margin-top: 15px;
  font-size: 10px;
  color: var(--text-2);
  text-align: right;
  line-height: 11px;
}

.hm-body { display: flex; flex-direction: column; }
.hm-months { display: grid; grid-auto-flow: column; height: 15px; font-size: 10.5px; color: var(--text-2); }
.hm-months span { white-space: nowrap; }

.hm-grid { display: grid; grid-template-rows: repeat(7, 11px); grid-auto-flow: column; gap: 3px; }

.hm-cell { width: 11px; height: 11px; border-radius: 2.5px; background: var(--hover); display: block; }
.hm-cell.lv1 { background: var(--accent); }
.hm-cell.empty { background: transparent; }
.hm-cell.has { cursor: pointer; }
.hm-cell.has:hover { outline: 1.5px solid var(--accent); outline-offset: 1px; }

.heatmap-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.heatmap-legend { display: inline-flex; align-items: center; gap: 4px; }

.log-cols { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }

.cal-grid .cal-w { font-size: 11.5px; color: var(--text-2); padding: 2px 0; }
.cal-grid .cal-d {
  display: block;
  width: 100%;
  padding: 6px 0;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
  position: relative;
}
.cal-grid .cal-d.blank { visibility: hidden; }
.cal-grid button.cal-d { cursor: pointer; color: var(--accent); font-weight: 600; }
.cal-grid button.cal-d:hover { background: var(--hover); }
.cal-grid .cal-d.has::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.cal-grid .cal-d.today { background: var(--accent); color: var(--accent-text); }
.cal-grid .cal-d.today.has::after { background: var(--accent-text); }

.log-cal-hint { font-size: 11.5px; color: var(--text-2); margin-top: 10px; line-height: 1.6; }

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

.log-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px 18px;
  scroll-margin-top: 84px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.log-entry.flash { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 125, 232, 0.18); }

.log-date { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.log-date .d { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.log-date .w { font-size: 11.5px; color: var(--text-2); }

.log-body { font-size: 14.5px; line-height: 1.8; }
.log-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.log-tag { font-size: 11px; color: var(--text-2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 6px; }

.log-empty { text-align: center; color: var(--text-2); padding: 50px 20px; font-size: 14px; line-height: 1.9; }
.log-empty code { background: var(--hover); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }

/* ==================== Markdown 正文排版（观点全文 / 记录正文共用） ==================== */

.md h3, .md h4, .md h5, .md h6 { font-weight: 600; line-height: 1.4; margin: 16px 0 8px; }
.md h3 { font-size: 17px; }
.md h4 { font-size: 16px; }
.md h5 { font-size: 15px; }
.md h6 { font-size: 14px; color: var(--text-2); }
.md p { margin: 10px 0; }
.md ul, .md ol { margin: 10px 0 10px 22px; }
.md li { margin: 4px 0; }
.md blockquote {
  margin: 12px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--accent);
  background: var(--hover);
  color: var(--text-2);
  border-radius: 0 8px 8px 0;
}
.md blockquote p { margin: 0; }
.md code {
  background: var(--hover);
  padding: 1.5px 6px;
  border-radius: 5px;
  font-size: 0.88em;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.md .md-pre {
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}
.md .md-pre code { background: none; padding: 0; font-size: 12.5px; line-height: 1.65; }
.md hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.md a { color: var(--accent); }
.md a:hover { text-decoration: underline; }
.md img { max-width: 100%; height: auto; border-radius: 8px; }

@media (max-width: 768px) {
  .views-head h1, .log-head h1 { font-size: 22px; }
  .view-card { padding: 15px 16px; }
  .view-title { font-size: 17px; }
  .log-cols { grid-template-columns: 1fr; }
  .heatmap-card { padding: 14px 12px 10px; }
  .log-entry { padding: 13px 15px; }
}
