/* =========================================================
   AIsFutre · 博客风格（全站唯一样式表）
   简约：纸白 / 墨黑、衬线标题、窄阅读栏、细分隔线、单一点缀色
   ========================================================= */

@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/source-serif-4-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; font-display: swap; src: url(/assets/fonts/source-serif-4-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-style: normal; font-display: swap; src: url(/assets/fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); }

:root {
  --bg: #faf9f6;
  --bg-soft: #f2f0ea;
  --surface: #ffffff;
  --ink: #1b1b1a;
  --text: #2b2b29;
  --muted: #76746e;
  --faint: #a8a59d;
  --rule: #e6e2d9;
  --rule-strong: #d3cec2;
  --accent: #b4532a;          /* 唯一点缀色：赭石 */
  --accent-soft: #f6ebe4;
  --mark: #fdf0c4;
  --serif: "Source Serif 4", "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --read: 680px;
  --wide: 1080px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #151514;
  --bg-soft: #1c1c1a;
  --surface: #1e1e1c;
  --ink: #f1efe9;
  --text: #dcd9d1;
  --muted: #9a978f;
  --faint: #6c6a64;
  --rule: #2b2a27;
  --rule-strong: #3a3935;
  --accent: #e08a5f;
  --accent-soft: #2a201b;
  --mark: #4a3d16;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151514; --bg-soft: #1c1c1a; --surface: #1e1e1c; --ink: #f1efe9; --text: #dcd9d1; --muted: #9a978f; --faint: #6c6a64;
    --rule: #2b2a27; --rule-strong: #3a3935; --accent: #e08a5f; --accent-soft: #2a201b; --mark: #4a3d16; color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.75; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--mark); color: var(--ink); }
[hidden] { display: none !important; }

.container { width: min(var(--wide), 100% - 40px); margin-inline: auto; }
.narrow, .read { width: min(var(--read), 100% - 40px); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: .9em; }
.kicker { font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* ---------- 顶栏 ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); display: inline-flex; align-items: baseline; gap: 2px; }
.logo-mark { display: none; }
.logo::after { content: "."; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-size: .92rem; color: var(--muted); transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--ink); padding-bottom: 2px; }
.nav-icon, .theme-toggle, .nav-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; transition: color .2s, background .2s; }
.nav-icon:hover, .theme-toggle:hover { color: var(--ink); background: var(--bg-soft); }
.nav-icon svg { width: 17px; height: 17px; }
.nav-toggle { display: none; font-size: 1.2rem; }
.install-btn { border: 1px solid var(--rule-strong); background: none; border-radius: 999px; padding: 3px 12px; font-size: .82rem; color: var(--muted); cursor: pointer; }
.install-btn:hover { color: var(--ink); border-color: var(--ink); }
.offline { background: var(--accent-soft); color: var(--accent); text-align: center; font-size: .85rem; padding: 6px 16px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--rule); padding: 36px 0 44px; margin-top: 40px; font-size: .85rem; color: var(--muted); }
.footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--ink); }

/* ---------- 通用按钮 / 表单 ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; border-radius: 999px; font-size: .92rem; font-weight: 500; cursor: pointer; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); transition: opacity .2s; }
.btn:hover { opacity: .85; }
.btn-ghost { background: none; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink); opacity: 1; }
.btn-primary { background: var(--ink); color: var(--bg); }
input[type="search"], input[type="text"], input[type="email"], textarea, select { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 8px; padding: 9px 12px; font-size: .92rem; color: var(--text); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); }
select { cursor: pointer; -webkit-appearance: none; appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%2376746e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 10px 6px; }
kbd { font-family: var(--mono); font-size: .78rem; padding: 1px 6px; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); }
mark { background: var(--mark); color: inherit; padding: 0 1px; border-radius: 2px; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 60; background: var(--ink); color: var(--bg); padding: 8px 18px; border-radius: 999px; font-size: .88rem; transition: all .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.to-top { position: fixed; right: 22px; bottom: 26px; z-index: 45; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule-strong); background: var(--bg); color: var(--muted); cursor: pointer; }
.to-top:hover { color: var(--ink); border-color: var(--ink); }

/* =========================================================
   首页 · 每日 10 条
   ========================================================= */
.masthead { padding: 72px 0 40px; border-bottom: 1px solid var(--rule); }
.masthead .kicker { display: block; margin-bottom: 18px; }
.mh-title { font-family: var(--serif); font-weight: 600; font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.15; letter-spacing: -.015em; color: var(--ink); }
.mh-date { margin-top: 14px; font-family: var(--serif); font-size: 1.15rem; color: var(--muted); }
.mh-date b { font-weight: 600; color: var(--ink); }
.mh-meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .84rem; color: var(--muted); }
.mh-meta span + span::before { content: "·"; margin-right: 18px; color: var(--faint); }
.dek { margin-top: 30px; font-family: var(--serif); font-size: 1.22rem; line-height: 1.85; color: var(--ink); }
.dek::first-letter { font-size: 3.2em; float: left; line-height: .9; padding: 6px 10px 0 0; font-weight: 600; color: var(--accent); }
/* 首字为英文 / 数字时（如「AI」）不做首字下沉，避免拆开单词 */
.dek.nodrop::first-letter { font-size: inherit; float: none; line-height: inherit; padding: 0; font-weight: inherit; color: inherit; }

.entries { list-style: none; }
.entry { padding: 44px 0 40px; border-bottom: 1px solid var(--rule); scroll-margin-top: 70px; }
.entry-no { font-family: var(--serif); font-size: .95rem; font-style: italic; color: var(--accent); margin-bottom: 10px; display: block; }
.entry-title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.4rem, 3vw, 1.75rem); line-height: 1.38; letter-spacing: -.005em; color: var(--ink); overflow-wrap: anywhere; }
.entry-title a { background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s; }
.entry-title a:hover { background-size: 100% 1px; }
.entry-meta { margin-top: 12px; font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 0; }
.entry-meta > * + *::before { content: "·"; margin: 0 9px; color: var(--faint); }
.entry-meta .src { color: var(--text); font-weight: 500; }
.entry-sum { margin-top: 18px; font-size: 1.04rem; line-height: 1.95; color: var(--text); }
.entry-opp { margin-top: 22px; padding: 2px 0 2px 18px; border-left: 2px solid var(--accent); }
.entry-opp-k { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; color: var(--accent); margin-bottom: 4px; }
.entry-opp p { font-family: var(--serif); font-size: 1.04rem; line-height: 1.9; color: var(--ink); }
.entry-foot { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: .86rem; color: var(--muted); }
.entry-foot a { color: var(--muted); border-bottom: 1px solid var(--rule-strong); transition: color .2s, border-color .2s; }
.entry-foot a:hover { color: var(--ink); border-color: var(--ink); }
.entry-foot .read-more { color: var(--ink); border-color: var(--ink); font-weight: 500; }
.entry-foot .rel { display: inline-flex; gap: 12px; flex-wrap: wrap; }
.entry-copy { margin-left: auto; border: 0; background: none; color: var(--faint); font-size: .84rem; cursor: pointer; }
.entry-copy:hover { color: var(--ink); }
.entry-skel { height: 220px; border-bottom: 1px solid var(--rule); background: linear-gradient(90deg, transparent, var(--bg-soft), transparent); background-size: 200% 100%; animation: sk 1.6s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 36px 0 8px; font-size: .9rem; }
.pager button { border: 0; background: none; color: var(--ink); cursor: pointer; font-family: var(--serif); font-size: 1rem; }
.pager button:disabled { color: var(--faint); cursor: default; }
.pager button:not(:disabled):hover { color: var(--accent); }
.pager select { font-size: .85rem; height: 36px; padding: 0 34px 0 16px; border-radius: 999px; text-align: center; text-align-last: center; }
.colophon { margin-top: 36px; font-size: .82rem; color: var(--faint); text-align: center; }
.colophon a { color: var(--muted); border-bottom: 1px solid var(--rule-strong); }
.empty { padding: 56px 0; text-align: center; color: var(--muted); font-family: var(--serif); font-size: 1.05rem; }

/* =========================================================
   金融复盘
   ========================================================= */
:root { --up: #c0392b; --down: #2e7d32; }
:root[data-theme="dark"] { --up: #ef6a5a; --down: #5cb85f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --up: #ef6a5a; --down: #5cb85f; } }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }

.mk-sec { padding-top: 48px; }
.mk-h { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; color: var(--ink); padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--ink); display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mk-h span { font-family: var(--sans); font-size: .78rem; font-weight: 400; color: var(--muted); }

.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 36px; align-items: start; }
.qt { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.qt caption { text-align: left; font-size: .76rem; font-weight: 600; letter-spacing: .08em; color: var(--muted); padding: 16px 0 6px; }
.qt th, .qt td { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.qt th { text-align: left; font-weight: 500; color: var(--text); }
.qt td { text-align: right; white-space: nowrap; }
.q-close { color: var(--ink); padding-right: 14px !important; }
.q-chg { width: 74px; font-weight: 600; }

.recap { list-style: none; }
.recap li { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.recap .entry-no { margin-bottom: 4px; }
.recap h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; line-height: 1.45; color: var(--ink); }
.recap p { margin-top: 10px; font-size: 1.02rem; line-height: 1.95; }

.view { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.view-head, .stock-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.view h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.view p { margin-top: 10px; font-size: 1.02rem; line-height: 1.95; }
.view-watch { padding-left: 16px; border-left: 2px solid var(--rule-strong); color: var(--muted); font-size: .95rem !important; }
.view-watch b { color: var(--ink); font-weight: 600; margin-right: 8px; }

.stance { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; }
.stance::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stance.pos { color: var(--up); }
.stance.neg { color: var(--down); }
.stance.neu { color: var(--muted); }

.stock { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.stock h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.stock .sym { font-family: var(--sans); font-size: .8rem; font-weight: 400; color: var(--faint); margin-left: 6px; }
.stock-px { margin-top: 6px; display: flex; gap: 14px; align-items: baseline; font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.stock-px .asof { font-size: .8rem; color: var(--faint); }
.stock-dl { margin-top: 12px; display: grid; grid-template-columns: 56px 1fr; gap: 8px 12px; }
.stock-dl dt { font-size: .82rem; font-weight: 600; color: var(--muted); padding-top: 3px; }
.stock-dl dd { font-size: .98rem; line-height: 1.85; }

.mk-src ul { list-style: none; }
.mk-src li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: .9rem; display: flex; gap: 12px; }
.mk-src li span { flex: none; color: var(--faint); font-size: .82rem; padding-top: 1px; }
.mk-src a { color: var(--text); }
.mk-src a:hover { color: var(--accent); }

.disclaimer { margin-top: 44px; padding: 16px 18px; background: var(--bg-soft); border-radius: 8px; font-size: .85rem; line-height: 1.8; color: var(--muted); }
.disclaimer strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: .88rem; }

/* =========================================================
   分享文案
   ========================================================= */
.post-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.post-tabs { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.post-tabs::-webkit-scrollbar { display: none; }
.cat { flex: none; border: 0; background: none; padding: 2px 0; font-size: .92rem; color: var(--muted); cursor: pointer; }
.cat:hover { color: var(--ink); }
.cat.active { color: var(--ink); font-weight: 600; box-shadow: inset 0 -1px 0 var(--ink); }
.post-bar select { height: 34px; padding-top: 0; padding-bottom: 0; font-size: .85rem; border-radius: 999px; }
.post-hint { margin-top: 14px; font-size: .88rem; color: var(--muted); }
.post-actions { position: sticky; top: 60px; z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 12px 0; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); }
.post-count { margin-right: auto; font-size: .85rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.post-dl { font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--rule-strong); }
.post-dl:hover { color: var(--ink); }
.post-text { white-space: pre-wrap; word-break: break-word; font-family: var(--sans); font-size: .92rem; line-height: 1.85; color: var(--text); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 20px 22px; }
.post-rich { background: #fff; color: #222; border: 1px solid var(--rule); border-radius: 8px; padding: 8px 22px 20px; font-size: .95rem; }
.post-rich a { color: #1a5fb4; text-decoration: underline; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .nav-links { gap: 16px; }
  .post-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .quotes { grid-template-columns: 1fr; gap: 0; }
  .masthead { padding: 48px 0 30px; }
  .dek { font-size: 1.1rem; }
  .entry { padding: 34px 0 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
