.foundry-shell { width: min(980px, calc(100% - 44px)); }
.foundry-toc { margin-top: 30px; padding: 24px; background: #ede9df; border-radius: 16px; }
.foundry-toc ul { margin-bottom: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 30px; }
.foundry-toc li { margin: 4px 0; }
.foundry-callout { border-left: 4px solid #5d8fa3; padding: 20px 24px; background: #ede9df; line-height: 1.8; }
.foundry-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.foundry-guide-grid article { padding: 24px; border: 1px solid var(--line-dark); border-radius: 16px; }
.foundry-guide-grid h3 { margin: 14px 0; font-size: 24px; line-height: 1.3; }
.guide-number { color: #48565e; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.foundry-flow { margin: 28px 0; padding: 24px; background: #142028; color: var(--white); border-radius: 16px; }
.foundry-flow figcaption { font-weight: 700; margin-bottom: 18px; }
.foundry-flow ol { list-style-position: inside; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.foundry-flow li { margin: 0; padding: 18px; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; font-size: 15px; }
.foundry-table-wrap { overflow-x: auto; border: 1px solid var(--line-dark); border-radius: 12px; }
.foundry-table-wrap table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 15px; }
.foundry-table-wrap caption { padding: 18px; text-align: left; font-weight: 700; background: #ede9df; }
.foundry-table-wrap th, .foundry-table-wrap td { padding: 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-dark); line-height: 1.65; }
.foundry-table-wrap th { background: #ede9df; }
.foundry-table-wrap tr:last-child td { border-bottom: 0; }
.foundry-shell code { overflow-wrap: anywhere; font-size: .9em; }
.foundry-shell pre code { overflow-wrap: normal; }
.foundry-shell section { scroll-margin-top: 24px; }
@media (max-width: 620px) {
  .foundry-toc ul, .foundry-guide-grid, .foundry-flow ol { grid-template-columns: minmax(0, 1fr); }
  .foundry-toc, .foundry-flow { padding: 20px; }
  .foundry-shell { width: calc(100% - 32px); }
}
