/* Handbook integration layer for the shared-expense ledger (09 同游分账).

   ledger.css is frozen upstream code and is never edited here. The standalone
   app it was extracted from supplied three things this handbook does not have:
   the --lake accent token, the iOS safe-area tokens, and a full-viewport app
   shell. This file restores only those, so the ledger keeps its own look while
   living inside a handbook section. */

#ledger {
  --lake: #217d91;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--limestone);
  border-top: 4px solid var(--editorial-ink);
}

/* The ledger was a standalone full-height app; inside a chapter it must size to
   its own content instead of claiming the viewport. */
#ledger .ledger-app {
  width: min(100%, 720px);
  min-height: 0;
  margin: 0 auto;
  padding: 4px 0 28px;
}

#ledger .ledger-intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 26px;
}

#ledger .ledger-intro-grid div {
  padding: 18px 20px;
  border: 1px solid rgba(19, 38, 47, .1);
  border-radius: 14px;
  background: #fff;
}

#ledger .ledger-intro-grid h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

#ledger .ledger-intro-grid p {
  margin: 0;
  color: #63777a;
  font-size: 12.5px;
  line-height: 1.72;
}

#ledger .ledger-settlement-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 18px 0 0;
  color: #7d8a8b;
  font-size: 11.5px;
  line-height: 1.7;
}

#ledger .ledger-settlement-note b {
  color: var(--ink);
  font-weight: 720;
}

#ledger-root[aria-busy="true"]::after {
  content: "正在打开共享账本…";
  display: block;
  padding: 26px 0;
  color: #7d8a8b;
  font-size: 13px;
}

@media (max-width: 900px) {
  #ledger .ledger-intro-grid { grid-template-columns: 1fr; gap: 12px; }
}
