/* ==========================================================================
   kaixinguor · 报刊编辑风设计系统
   源头：ai-daily/2026-10-26.html（每日 AI 日报母版）
   日报 / 首页 / 归档 / 工具 / 许愿 共用这一份。
   目录：
   01 tokens        02 base          03 site chrome
   04 报头          05 目录          06 正文与卡片
   07 首页          08 归档          09 工具页（标签）
   10 表单与按钮    11 产品子站兼容  12 工具类 / 响应式 / 打印
   ========================================================================== */

/* ---------- 01 tokens ---------- */
:root {
  --paper: #f7f3ed;
  --paper-2: #fffdf9;
  --paper-90: rgba(247, 243, 237, .92);
  --ink: #16120e;
  --ink-2: #413a33;
  --muted: #7d7368;
  --line: #e3dacd;
  --line-soft: #ece5da;
  --tint: rgba(0, 0, 0, .022);
  --accent: #b23a1e;
  --accent-d: #e8805f;
  --c: var(--accent);
  --cd: var(--accent-d);

  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Bookman Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --maxw: 1080px;
  --radius: 3px;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #14110f;
  --paper-2: #1c1815;
  --paper-90: rgba(20, 17, 15, .9);
  --ink: #f2ece3;
  --ink-2: #cfc5b6;
  --muted: #948a7d;
  --line: #302922;
  --line-soft: #262019;
  --tint: rgba(255, 255, 255, .045);
  --accent: #e8805f;
  --accent-d: #e8805f;
  color-scheme: dark;
}

/* 栏目色：只在小面积出现（序号框、卡片左竖条、小标签） */
[data-c="model"]    { --c: #a83a1e; --cd: #e8805f; }
[data-c="product"]  { --c: #2f5d8a; --cd: #7fb0db; }
[data-c="research"] { --c: #2e6b5e; --cd: #79c1ad; }
[data-c="robot"]    { --c: #7a4553; --cd: #cf8fa0; }
[data-c="capital"]  { --c: #8a6a1f; --cd: #d9b665; }
[data-c="listen"]   { --c: #2f5d8a; --cd: #7fb0db; }
[data-c="read"]     { --c: #2e6b5e; --cd: #79c1ad; }
[data-c="wish"]     { --c: #8a6a1f; --cd: #d9b665; }
[data-theme="dark"] [data-c] { --c: var(--cd); }

/* ---------- 02 base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 74px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 80% -6%, rgba(178, 58, 30, .07), transparent 62%),
    radial-gradient(720px 420px at 4% 2%, rgba(47, 93, 138, .055), transparent 60%);
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; }

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

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 32px);
}

main { position: relative; z-index: 1; flex: 1 0 auto; }
main.wrap { width: 100%; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  font-size: 13px;
  transition: top .15s ease;
}
.skip:focus { top: 10px; text-decoration: none; }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 60;
}

/* ---------- 03 site chrome ---------- */
header.site {
  position: relative;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: var(--paper-90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  min-height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .015em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--accent);
  transform: translateY(1px);
}

nav.top {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 24px);
  margin-left: auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 15px 0;
}
nav.top::-webkit-scrollbar { display: none; }

nav.top a {
  flex: none;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .18s, border-color .18s;
}
nav.top a:hover { color: var(--ink); text-decoration: none; }
nav.top a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.lang-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: .25rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-decoration: none;
  cursor: pointer;
  transition: color .18s, border-color .18s;
}
.lang-btn:hover { color: var(--ink); border-color: var(--muted); text-decoration: none; }

.icon-btn {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color .18s, border-color .18s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--muted); }

footer.site {
  position: relative;
  z-index: 1;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.8;
}
footer.site .wrap {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
footer.site .foot-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}
footer.site .foot-brand {
  font-family: var(--serif);
  font-size: 1.06rem;
  color: var(--ink);
  margin-bottom: 4px;
}
footer.site .foot-grid > div:first-child > p {
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: .98rem;
  line-height: 1.7;
}
.foot-src {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
}
footer.site p { margin: 0; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--ink); }
footer.site .beian {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
footer.site .beian:hover { color: var(--ink); }

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.foot-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-align: right;
  white-space: nowrap;
}

/* ---------- 04 报头 ---------- */
.masthead {
  position: relative;
  z-index: 1;
  padding: clamp(30px, 5vw, 52px) 0 clamp(24px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
}

.kicker {
  display: flex;
  align-items: center;
  gap: .62rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker .sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.kicker .zh { color: var(--accent); letter-spacing: .12em; }
.kicker .issue-tag { margin-left: auto; letter-spacing: .12em; }

h1.date {
  margin: .42rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 6.4vw, 3.9rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.015em;
}
h1.date .weekday {
  display: inline-block;
  margin-left: .9em;
  vertical-align: .42em;
  font-family: var(--mono);
  font-size: .24em;
  font-weight: 400;
  letter-spacing: .2em;
  color: var(--muted);
}

.deck {
  max-width: 46em;
  margin: .85rem 0 0;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.8;
  text-wrap: pretty;
}
.deck em {
  font-style: normal;
  box-shadow: inset 0 -.5em 0 rgba(178, 58, 30, .16);
}

.metabar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin-top: 1.35rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
}
.metabar .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .18rem .62rem;
  background: var(--tint);
}

/* ---------- 05 目录 ---------- */
.toc {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: var(--paper-90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.toc-inner {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 11px 0;
  scrollbar-width: none;
}
.toc-inner::-webkit-scrollbar { display: none; }
.toc a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s;
}
.toc a .n {
  margin-right: .34rem;
  color: var(--accent);
  font-size: 10px;
}
.toc a:hover { color: var(--ink); }

/* ---------- 06 正文与卡片 ---------- */
.tldr {
  margin: clamp(26px, 4vw, 38px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.tldr li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(.8rem, 2.4vw, 1.3rem);
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}
.tldr .idx {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  opacity: .85;
}
.tldr p {
  margin: 0;
  color: var(--ink-2);
  font-size: .985rem;
  text-wrap: pretty;
}
.tldr b { color: var(--ink); font-weight: 600; }

.chapter { padding-top: clamp(38px, 5.5vw, 58px); }

.chead {
  display: flex;
  align-items: baseline;
  gap: .72rem;
  margin-bottom: 1.3rem;
}
.cnum {
  padding: .02rem .34rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: var(--c);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  transform: translateY(-3px);
}
.chead h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.2vw, 1.8rem);
  font-weight: 600;
  letter-spacing: .01em;
}
.cen {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  transform: translateY(-1px);
  white-space: nowrap;
}
.crule {
  flex: 1;
  height: 1px;
  align-self: center;
  background: linear-gradient(90deg, var(--line), transparent);
}
.chead .chead-link {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--muted);
  white-space: nowrap;
}
.chead .chead-link:hover { color: var(--accent); }

.items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.card {
  position: relative;
  padding: 19px 21px 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: inherit;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--c);
  opacity: .5;
  transition: opacity .22s, width .22s;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-soft);
  box-shadow: 0 10px 26px -18px rgba(22, 18, 14, .5);
}
.card:hover::before { opacity: 1; width: 3px; }

a.card:hover { text-decoration: none; }

.cmeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .09em;
}
.cmeta .d { color: var(--c); }
.cmeta .src {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s, border-color .18s;
}
.cmeta .src:hover { color: var(--c); border-color: currentColor; }

.card h3 {
  margin: .5rem 0 .5rem;
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.9vw, 1.27rem);
  font-weight: 600;
  line-height: 1.46;
  letter-spacing: .004em;
}
.card h3 a { color: inherit; text-decoration: none; }
.card > p {
  margin: 0;
  color: var(--ink-2);
  font-size: .96rem;
  line-height: 1.72;
  text-wrap: pretty;
}

.why {
  margin-top: .8rem;
  padding: .58rem .78rem;
  border-left: 2px solid var(--c);
  border-radius: 0 2px 2px 0;
  background: var(--tint);
  color: var(--ink-2);
  font-size: .925rem;
  line-height: 1.7;
}
.why b {
  display: block;
  margin-bottom: .12rem;
  color: var(--c);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .16em;
}

@media (min-width: 830px) {
  .items { grid-template-columns: 1fr 1fr; gap: 16px; }
  .card.wide { grid-column: 1 / -1; }
  .card.wide,
  .items > .card:last-child:nth-child(odd) {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    column-gap: 32px;
    align-content: start;
  }
  .card.wide .cmeta,
  .items > .card:last-child:nth-child(odd) .cmeta { grid-column: 1 / -1; }
  .card.wide h3,
  .items > .card:last-child:nth-child(odd) h3 { grid-column: 1; margin-bottom: 0; }
  .card.wide > p,
  .items > .card:last-child:nth-child(odd) > p { grid-column: 1; }
  .card.wide .why,
  .items > .card:last-child:nth-child(odd) .why {
    grid-column: 2;
    /* 占满正文的整列，避免 why 撑高它所在的行、在段落之间留下空白 */
    grid-row: 2 / span 30;
    margin-top: 0;
    align-self: start;
  }
  .items > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.issue-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(44px, 6vw, 64px);
  border-top: 1px solid var(--line);
  padding: 24px 0 8px;
  color: var(--muted);
  font-size: .855rem;
  line-height: 1.85;
}
.issue-footer p { max-width: 60em; margin: 0 0 .5rem; }
.issue-footer .sig {
  margin-top: 1.1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
}
.issue-footer .disclaimer b {
  margin-right: .55em;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- 07 首页：整份日报 + 左侧往期抽屉 ---------- */
.today { position: relative; z-index: 1; }
.today-body { padding-bottom: 8px; }

/* 左侧贴边的往期抽屉 */
.archive-drawer {
  --drawer-w: min(320px, 88vw);
  position: relative;
  z-index: 80;
}

.archive-handle {
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 92;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 32px;
  height: 140px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 3px 3px 0;
  background: var(--paper-2);
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  box-shadow: inset 3px 0 0 var(--accent), 10px 0 30px -22px rgba(22, 18, 14, .45);
  transition: left .3s cubic-bezier(.2,.7,.2,1), top .3s cubic-bezier(.2,.7,.2,1),
              width .3s cubic-bezier(.2,.7,.2,1), height .3s cubic-bezier(.2,.7,.2,1),
              color .18s, border-color .18s;
}
.archive-handle::-webkit-details-marker { display: none; }
.archive-handle::marker { content: ""; }
.archive-handle:hover { color: var(--ink); border-color: var(--muted); }
.ah-label {
  display: flex;
  align-items: center;
  gap: 6px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.ah-zh {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .2em;
}
.ah-close { display: none; font-family: var(--mono); font-size: 18px; line-height: 1; }

.archive-panel {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: var(--drawer-w);
  border-right: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 24px 0 70px -40px rgba(22, 18, 14, .55);
  transform: translateX(calc(-1 * var(--drawer-w)));
  visibility: hidden;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), visibility 0s linear .3s;
}
.archive-drawer[open] .archive-panel {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), visibility 0s linear 0s;
}
.archive-panel-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 22px 54px 14px 22px;
  border-bottom: 1px solid var(--line);
}
.archive-panel-head .kicker { font-size: 10px; letter-spacing: .16em; }
.archive-panel-head .kicker .zh { color: var(--accent); }
.archive-panel-body {
  flex: 1;
  min-height: 0;
  padding: 4px 22px 28px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.archive-drawer[open] .archive-handle {
  left: calc(var(--drawer-w) - 46px);
  top: 16px;
  width: 32px;
  height: 32px;
  transform: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}
.archive-drawer[open] .ah-label { display: none; }
.archive-drawer[open] .ah-close { display: block; }
.archive-drawer[open]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(22, 18, 14, .2);
  pointer-events: none;
}
html.archive-open,
html.archive-open body { overflow: hidden; }

.archive-month { margin: 0; }
.archive-month > summary {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  padding: 12px 0 6px;
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
}
.archive-month > summary::-webkit-details-marker { display: none; }
.archive-month > summary::marker { content: ""; }
.archive-month > summary::before {
  content: "›";
  display: inline-block;
  color: var(--muted);
  transition: transform .18s ease;
}
.archive-month[open] > summary::before { transform: rotate(90deg); }
.archive-month .am-count {
  margin-left: auto;
  color: var(--accent);
  font-size: 9.5px;
}
.archive-link {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  color: inherit;
}
.archive-link:hover { text-decoration: none; }
.archive-link .a-date {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
}
.archive-link .a-date em {
  margin-left: .3em;
  color: var(--muted);
  font-style: normal;
  letter-spacing: .12em;
}
.archive-link .a-head {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: .95rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.archive-link:hover .a-head { color: var(--ink); }
.archive-link.is-current .a-date { color: var(--accent); }
.archive-link.is-current .a-date em { color: var(--accent); }
.archive-empty {
  padding: 14px 0;
  color: var(--muted);
  font-size: .86rem;
}

/* ---------- 09 工具页（标签） ---------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  margin-top: clamp(24px, 4vw, 36px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tabs-inner {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-inner::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: none;
  padding: 14px 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .18s, border-color .18s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.tab .n {
  margin-left: .38rem;
  color: var(--accent);
  font-size: 9.5px;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 248px;
  padding: 22px 23px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: inherit;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.tool-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--c);
  opacity: .55;
  transition: opacity .22s, width .22s;
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-soft);
  box-shadow: 0 10px 26px -18px rgba(22, 18, 14, .5);
  text-decoration: none;
}
.tool-card:hover::before { opacity: 1; width: 3px; }
.tool-card[hidden] { display: none; }

.tool-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.tool-top img {
  width: 48px;
  height: 48px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.tool-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}
.tag {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .09em;
  line-height: 1.55;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag.state { color: var(--c); border-color: currentColor; }
.tag.price { color: var(--ink-2); }

.tool-card h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.3;
}
.tool-card h3 .en {
  margin-left: .4em;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .56em;
  font-weight: 400;
  letter-spacing: .12em;
  vertical-align: .18em;
}
.tool-card p {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: .93rem;
  line-height: 1.68;
  text-wrap: pretty;
}
.tool-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
}
.tool-foot .go { color: var(--accent); }
.tool-card.ghost {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 132px;
  border-style: dashed;
  background: transparent;
  text-align: center;
}
.tool-card.ghost::before { display: none; }
.tool-card.ghost .ghost-plus {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
}
.tool-card.ghost .ghost-line {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.08rem;
}
.tool-card.ghost .ghost-sub {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
}
.tools-empty {
  padding: 30px 0;
  color: var(--muted);
  font-size: .95rem;
}

/* ---------- 10 表单与按钮 ---------- */
.page-head {
  position: relative;
  z-index: 1;
  padding: clamp(36px, 6vw, 64px) 0 clamp(22px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  margin: .48rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.012em;
}
.page-head .deck { margin-top: .7rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: opacity .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; opacity: .88; }
.btn-primary { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-primary { color: #1b1512; }
.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--muted); }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.wish-form {
  max-width: 720px;
  margin: 8px 0 0;
}
.wish-form label { display: block; margin-bottom: 26px; }
.wish-form label > span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.wish-form label > em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-style: normal;
}
.wish-form textarea,
.wish-form input,
.wish-form select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.6;
  resize: vertical;
}
.wish-form textarea::placeholder,
.wish-form input::placeholder { color: var(--muted); opacity: .8; }
.wish-form textarea:focus,
.wish-form input:focus,
.wish-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(178, 58, 30, .1);
}
.wish-form select { padding-right: 34px; }
.wish-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* 发送前的确认弹窗（wish.html） */
/* 许愿页底部：直接找我的入口 */
.wish-contact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  max-width: 720px;
  margin: 46px 0 20px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.wish-contact-text { min-width: 0; }
.wish-qr {
  flex: none;
  margin: 0;
  text-align: center;
}
.wish-qr img {
  display: block;
  width: 132px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 6px;
}
.wish-qr figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
}
@media (max-width: 560px) {
  .wish-contact { flex-direction: column; gap: 16px; }
  .wish-qr { display: flex; align-items: center; gap: 12px; }
  .wish-qr figcaption { margin-top: 0; }
  .wish-qr img { width: 96px; }
}
.wish-contact-lead {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.wish-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(90vh, 940px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .22);
  overflow: hidden;
}
.wish-dialog::backdrop { background: rgba(20, 15, 12, .45); }
.wish-dialog .inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: inherit;
  padding: 22px 24px 20px;
  overflow-y: auto;
}
.wish-dialog h2 { margin: 0; font-size: 19px; line-height: 1.35; }
.wish-dialog-hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.wish-dialog label { display: block; }
.wish-dialog label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.wish-dialog input,
.wish-dialog textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
}
.wish-dialog textarea {
  height: clamp(190px, 34vh, 300px);
  font-family: var(--mono);
  font-size: 13px;
}
.wish-dialog input:focus,
.wish-dialog textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(178, 58, 30, .1);
}
.wish-status { margin: 0; min-height: 1.25em; color: var(--muted); font-size: 13px; line-height: 1.5; }
.wish-status[data-state="ok"] { color: #2f7d4f; }
.wish-status[data-state="err"] { color: var(--accent); }
.wish-dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.wish-dialog-actions .spacer { flex: 1 1 auto; }
@media (max-width: 520px) {
  .wish-dialog .inner { padding: 18px 16px 16px; }
  .wish-dialog-actions .spacer { display: none; }
  .wish-dialog-actions { gap: 8px; }
  .wish-dialog-actions .btn { flex: 1 1 auto; }
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---------- 11 产品子站兼容（hark / snipread / download / changelog） ---------- */
.product-page .hero {
  padding: clamp(46px, 7vw, 82px) 0 clamp(34px, 5vw, 54px);
}
.product-page .hero h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.product-page .hero .lead {
  max-width: 36em;
  margin: 0 0 26px;
  color: var(--ink-2);
  font-size: 1.06rem;
  line-height: 1.8;
  text-wrap: pretty;
}
.product-page .eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.product-page .sub {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 1.02rem;
}
.product-page section { padding: clamp(30px, 4.5vw, 44px) 0; }
.product-page h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 1.82rem);
  font-weight: 600;
  letter-spacing: .005em;
}
.product-page h3.sub {
  margin: 28px 0 6px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}
.product-page p { margin: 0 0 14px; }
.product-page ul,
.product-page ol { margin: 0 0 16px; padding-left: 22px; color: var(--ink-2); }
.product-page li { margin-bottom: 6px; }
.product-page hr {
  margin: 38px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.product-page .muted { color: var(--ink-2); }
.product-page .faint { color: var(--muted); font-size: .855rem; }
.product-page code {
  padding: .1em .32em;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--tint);
  font-family: var(--mono);
  font-size: .86em;
}
.product-page .notice {
  margin: 24px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--tint);
  color: var(--ink-2);
  font-size: .93rem;
}
.product-page .shot { margin: 24px 0; }
.product-page .shot img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}
.product-page .shot figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  text-align: center;
}
.product-page table.compare {
  width: 100%;
  margin: 18px 0 10px;
  border-collapse: collapse;
  font-size: .92rem;
}
.product-page table.compare th,
.product-page table.compare td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.product-page table.compare th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.product-page table.compare td:first-child { width: 34%; color: var(--ink-2); }
.product-page table.compare .yes { color: var(--ink); }
.product-page table.compare .no { color: var(--muted); }
.product-page details {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.product-page summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}
.product-page summary::-webkit-details-marker { display: none; }
.product-page summary::before {
  content: "＋";
  margin-right: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}
.product-page details[open] summary::before { content: "－"; }
.product-page details p {
  margin: 10px 0 0 24px;
  color: var(--ink-2);
  font-size: .93rem;
}

/* ---------- 12 工具类 / 响应式 / 打印 ---------- */
.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.faint { color: var(--muted); font-size: .855rem; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[data-pending] body { visibility: hidden; }
[hidden] { display: none !important; }

/* 首页中英文日报区：由 <html lang> 决定显示哪一版 */
html[lang="en"] [data-lang="zh"],
html[lang^="zh"] [data-lang="en"] { display: none !important; }

/* 桌面才有贴边把手；窄屏从导航「归档」打开 */
@media (max-width: 1120px) {
  .archive-drawer:not([open]) .archive-handle {
    width: 18px;
    height: 96px;
    border-radius: 0 2px 2px 0;
  }
  .archive-drawer:not([open]) .archive-handle .ah-label { display: none; }
  .archive-drawer:not([open]) .archive-handle::before {
    content: "›";
    color: var(--accent);
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1;
  }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 64px; }
  .toc-inner {
    -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent);
    mask-image: linear-gradient(90deg, #000 90%, transparent);
    padding-right: 24px;
  }
  .tool-grid { grid-template-columns: 1fr; }
  .archive-drawer { --drawer-w: min(340px, 92vw); }
  footer.site .foot-grid { grid-template-columns: 1fr; }
  .foot-meta { text-align: left; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  header.site .wrap { min-height: 54px; gap: 12px; }
  .brand { font-size: 15px; }
  nav.top { gap: 12px; padding: 13px 0; }
  nav.top a { font-size: 10px; letter-spacing: .08em; }
  .lang-btn { padding: .2rem .42rem; font-size: 9.5px; }
  .icon-btn { width: 25px; height: 25px; font-size: 12px; }
  .metabar { gap: .42rem .7rem; font-size: 10px; }
  .kicker { font-size: 10px; }
  .kicker .issue-tag { display: none; }
  .chead { flex-wrap: wrap; gap: .5rem .6rem; }
  .chead .crule { min-width: 40px; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .tool-card { min-height: 0; }
  .tool-card.ghost { flex-direction: column; gap: 8px; min-height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .progress,
  .toc,
  .tabs,
  .skip,
  header.site,
  footer.site,
  body::before { display: none; }
  body { display: block; background: #fff; color: #000; font-size: 11pt; }
  .card { break-inside: avoid; box-shadow: none; }
  .chapter { padding-top: 22pt; }
  a { color: #000; text-decoration: none; }
}
