.book-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 100vh;
}
.book-side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1.1rem 1.05rem 2rem;
}
.book-brand {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}
.book-brand:hover { text-decoration: none; color: var(--accent); }
.book-all {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 0.85rem;
}
.book-all:hover { color: var(--accent); }
.book-side input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.85rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.82rem;
}
.book-part {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0.85rem 0 0.35rem;
}
.book-side a.leaf,
.book-side .soon {
  display: block;
  font-size: 0.86rem;
  line-height: 1.4;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
.book-side a.leaf:hover { background: var(--bg); text-decoration: none; }
.book-side a.leaf.active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-weight: 600;
}
.book-side .soon { color: var(--text-muted); opacity: 0.72; cursor: default; }
.book-side .soon::after {
  content: " 即将译出";
  font-size: 0.72em;
  opacity: 0.85;
  white-space: nowrap;
}
.book-main { min-width: 0; }
.book-main .wrap { max-width: 920px; }
@media (max-width: 900px) {
  .book-shell { grid-template-columns: 1fr; }
  .book-side {
    position: relative;
    height: auto;
    max-height: 46vh;
  }
}

.src-note { font-size: 0.85rem; color: var(--text-muted); }
.article img.fig {
  display: block;
  width: 100%;
  max-width: 920px;
  margin: 0.8rem 0 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}
.article .figcap {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.45;
}
.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 0.8rem 0 1.2rem;
}
.article th,
.article td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.5rem;
  text-align: left;
  vertical-align: top;
}
.article th { background: var(--bg-card); }
.article pre {
  overflow-x: auto;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.86rem;
  line-height: 1.45;
}
.callout {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0.9rem 0 1.2rem;
}
.callout.warn {
  border-color: color-mix(in srgb, #c45c26 45%, var(--border));
}
.callout.tip {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.callout strong.label { display: block; margin-bottom: 0.35rem; }
.workflow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 1.4rem;
}
.workflow-grid a {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}
.workflow-grid a:hover { border-color: var(--accent); }
.workflow-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: #111;
}
.workflow-grid .cap {
  padding: 0.7rem 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
}
@media (max-width: 700px) {
  .workflow-grid { grid-template-columns: 1fr; }
}
