.balance-page { background: radial-gradient(ellipse at 75% 0%, #2c3d3f 0, #111b20 45rem); }
.balance-shell { width: min(100% - 4rem, 82rem); margin-inline: auto; padding-block: 3.5rem 5rem; }
.balance-page .notes-shell, .balance-page footer { width: min(100% - 4rem, 82rem); }
.balance-intro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; margin-bottom: 4rem; }
.balance-intro .notes-kicker { font-size: .8125rem; line-height: 1.8; letter-spacing: .13em; }
.balance-intro h1 { font-size: clamp(2.7rem, 4.8vw, 4.6rem); font-weight: 400; line-height: 1.08; letter-spacing: -.035em; color: #efd5a3; margin: 0; }
.balance-intro h1 span { display: block; font-size: .5em; letter-spacing: .015em; color: #cbbb9f; margin-bottom: .45em; }
.balance-deck { max-width: 31rem; color: #d5c8b2; font-size: 1.1875rem; line-height: 1.6; margin: 1.4rem 0; }
.balance-date { font: .875rem/1.7 Arial, sans-serif; color: #b9b4a9; margin: 0 0 1.5rem; }
.analysis-status { padding: 1rem 1.2rem; border-left: 3px solid #bb9562; background: #cdb4850a; max-width: 32rem; }
.analysis-status p { margin: 0; font: .9375rem/1.7 Arial, sans-serif; color: #e4cfaa; }
.adventure-plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.adventure-plates figure { margin: 0; border: 1px solid #78654d; background: #162227; padding: .45rem; box-shadow: 0 14px 40px #0004; }
.adventure-plates figure:last-child { margin-top: 2.5rem; }
.adventure-plates img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.adventure-plates figcaption { padding: .9rem .3rem .5rem; text-align: center; font-size: .875rem; line-height: 1.5; color: #d6c3a0; }
.balance-layout { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); align-items: start; gap: 3rem; }
.balance-sidebar { position: sticky; top: 1.5rem; max-height: calc(100svh - 3rem); overflow-y: auto; padding: .5rem 1rem .5rem .2rem; }
.contents-label { margin: 0 0 1rem; color: #cdb485; font: .8125rem/1.5 Arial, sans-serif; text-transform: uppercase; letter-spacing: .13em; }
.balance-sidebar ol { padding: 0; margin: 0; list-style: none; }
.balance-sidebar li + li { border-top: 1px solid #d3b98816; }
.balance-sidebar nav a { display: grid; grid-template-columns: 1.5rem 1fr; gap: .45rem; padding: .65rem .15rem; font: .875rem/1.5 Arial, sans-serif; color: #cac4b9; text-decoration: none; }
.balance-sidebar nav a span { color: #aa9472; font-size: .75rem; padding-top: .1rem; }
.balance-sidebar nav a:hover { color: #efd5a3; }
.source-download { display: flex; justify-content: space-between; gap: .5rem; padding: 1rem 0; margin-top: 1.2rem; border-top: 1px solid #78654d; font: .875rem/1.6 Arial, sans-serif; color: #e1c99f; }
.reference-note { font: .8125rem/1.65 Arial, sans-serif; color: #b9b4a9; margin: .5rem 0 0; }
.balance-content { min-width: 0; }
.balance-section { border: 1px solid #415055; background: #17242a; padding: clamp(1.35rem, 3vw, 2.6rem); margin-bottom: 1.5rem; scroll-margin-top: 1.5rem; }
.balance-section:nth-child(even) { background: #1a282d; }
.assessment-section { border-top: 3px solid #b49a6b; }
.balance-section h2 { display: flex; align-items: baseline; gap: 1rem; font-size: clamp(1.5rem, 2.25vw, 2rem); font-weight: 400; line-height: 1.3; letter-spacing: -.012em; padding-bottom: 1.3rem; margin: 0 0 1.5rem; border-bottom: 1px solid #a9957438; color: #efd5a3; }
.chapter-number { font: .8125rem/1.5 Arial, sans-serif; color: #b79e76; flex-shrink: 0; }
.source-content { color: #d0ccc2; overflow-wrap: anywhere; }
.balance-section p, .balance-section li { font-size: 1.0625rem; line-height: 1.85; }
.balance-section p { margin: 0 0 1.25rem; }
.balance-section h3 { font-size: 1.4rem; font-weight: 400; line-height: 1.5; margin: 2.5rem 0 1.2rem; color: #e6cc9d; scroll-margin-top: 1.5rem; }
.balance-section .source-content > h3:first-child { margin-top: 0; }
.balance-section strong { color: #efe0c5; }
.balance-section ul, .balance-section ol { padding-left: 1.35rem; margin: 1.2rem 0 1.6rem; }
.balance-section li { padding-left: .25rem; margin-bottom: .8rem; }
.balance-section li::marker { color: #cdb485; }
.balance-section .source-content > :last-child { margin-bottom: 0; }
.assessment-section ul { list-style: none; padding: 0; display: grid; gap: .75rem; }
.assessment-section li { margin: 0; padding: 1.1rem 1.25rem; border-left: 2px solid #877a60; background: #0d181e77; }
.balance-table { overflow-x: auto; max-width: 100%; margin: 1.5rem 0; border: 1px solid #546166; scrollbar-color: #88765a #132027; }
.balance-table table { width: 100%; border-collapse: collapse; font: .9375rem/1.65 Arial, sans-serif; }
.balance-table th { text-align: left; vertical-align: top; padding: .9rem 1rem; background: #293b40; color: #f0d8ad; font-weight: 600; min-width: 7.5rem; }
.balance-table td { padding: .9rem 1rem; border-top: 1px solid #415055; vertical-align: top; min-width: 6rem; }
.balance-table tr:nth-child(even) td { background: #ffffff04; }
.balance-table td:first-child { color: #e3d1b1; }
.balance-section code { font: .875em/1.65 Consolas, monospace; color: #e5d1b2; background: #0e1b2080; padding: .1em .25em; border-radius: 2px; }
.balance-section pre { overflow-x: auto; max-width: 100%; padding: 1.25rem; background: #0e1a20; border: 1px solid #415055; }
.balance-section pre code { background: none; padding: 0; white-space: pre; overflow-wrap: normal; }
.repository-reference { color: #dbd0b6; text-decoration: underline dotted #9c8b70; text-underline-offset: .2em; }
.technical-section { padding-block: 1.35rem; }
.technical-section summary { cursor: pointer; position: relative; padding-right: 1.6rem; }
.technical-section summary::marker { color: #cdb485; }
.technical-section summary h2 { display: inline-flex; border: 0; margin: 0; padding: 0; font-size: 1.3rem; }
.technical-section .expand-label { display: block; margin: .5rem 0 0 2.25rem; font: .8125rem/1.5 Arial, sans-serif; color: #b9b4a9; }
.technical-section[open] .expand-label { display: none; }
.technical-section[open] .source-content { border-top: 1px solid #a9957438; margin-top: 1.4rem; padding-top: 1.5rem; }
.balance-end { display: flex; justify-content: space-between; gap: 1.5rem; padding-block: 1.5rem; color: #cbbb9f; font: .875rem/1.7 Arial, sans-serif; }
.skip-link { position: absolute; left: 1rem; top: -10rem; z-index: 5; padding: .75rem 1rem; background: #efd5a3; color: #111b20; }
.skip-link:focus { top: 1rem; }
.balance-page :focus-visible { outline-offset: 3px; }
@media (max-width: 1050px) {
  .balance-intro { gap: 2rem; }
  .balance-layout { grid-template-columns: 1fr; gap: 2rem; }
  .balance-sidebar { position: static; max-height: none; padding: 1.5rem; border-block: 1px solid #78654d; }
  .balance-sidebar ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
  .source-download { max-width: 20rem; }
  .reference-note { max-width: 45rem; }
}
@media (max-width: 700px) {
  .balance-shell, .balance-page .notes-shell, .balance-page footer { width: calc(100% - 2.5rem); }
  .balance-shell { padding-block: 2rem 3rem; }
  .balance-intro { grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
  .balance-intro h1 { font-size: clamp(2.5rem, 8vw, 3.5rem); }
  .adventure-plates img { aspect-ratio: 5 / 4; }
  .adventure-plates figure:last-child { margin-top: 1rem; }
  .balance-sidebar { padding: 1.5rem .2rem; }
  .balance-sidebar ol { gap: 0 1rem; }
  .balance-section { padding: 1.3rem; }
  .balance-section h2 { gap: .7rem; }
  .balance-section p, .balance-section li { font-size: 1rem; line-height: 1.8; }
  .balance-table th, .balance-table td { padding: .75rem; }
  .balance-table table { min-width: 36rem; }
  .assessment-section li { padding: 1rem; }
}
@media (max-width: 380px) {
  .balance-sidebar ol { grid-template-columns: 1fr; }
  .balance-section { padding: 1rem; }
  .balance-end { flex-direction: column; }
}
@media print {
  .notes-header, .balance-sidebar, .balance-end, .skip-link { display: none; }
  .balance-shell { width: 100%; padding: 0; }
  .balance-layout { display: block; }
  .balance-intro { break-after: avoid; }
  .balance-page { background: #fff; color: #111; }
  .balance-section, .balance-section:nth-child(even) { background: #fff; border-color: #aaa; break-inside: auto; }
  .balance-section *, .balance-intro * { color: #111; }
  .balance-table { overflow: visible; }
  .balance-table table { min-width: 0; font-size: 8pt; }
  .balance-table th, .balance-table td { min-width: 0; padding: .3rem; }
  .technical-section::details-content { content-visibility: visible; display: block; }
}
