/* The portal's book/paper language, scoped to its tools. Status and chart colours stay semantic. */
body #sg-app{--td-paper:#fffdf6;--td-ink:#202321;--td-rule:#d9c9ad;--td-gold:#e6a032;font-family:inherit;color:var(--td-ink);border-radius:5px 14px 14px 5px;border-left:6px solid var(--td-gold);box-shadow:4px 4px 0 #eee5d5,5px 5px 0 #d9c9ad}
body #sg-app .sg-bg-white{background:#fffdf6}
body #sg-app .sg-bg-gray-50{background:#f8f4eb}
body #sg-app .sg-text-xs{font-size:14px;line-height:1.55}
body #sg-app .sg-text-sm{font-size:16px;line-height:1.55}
body #sg-app .sg-text-gray-400,body #sg-app .sg-text-gray-500{color:#655e52}
body #sg-app :is(.sg-border-gray-200,.sg-border-gray-300){border-color:#d9c9ad}
body #sg-app :is(.sg-bg-blue-50,.sg-bg-primary-50,.sg-bg-blue-100){background:#f5ead4}
body #sg-app :is(.sg-text-blue-600,.sg-text-blue-700,.sg-text-primary-600){color:#785019}
body #sg-app :is(.sg-bg-blue-600,.sg-bg-primary-600),body #sg-app [style*="background-color: rgb(59, 130, 246)"]{background-color:#e6a032!important;color:#202321}
body #sg-app [style*="linear-gradient(180deg, rgb(239, 246, 255)"]{background:#f7eedf!important}
body #sg-app button:not(:disabled):hover{filter:brightness(.96)}
body #sg-app :is(button,input,select,textarea):focus-visible,.zo-in-site :is(button,input,select,textarea):focus-visible{outline:3px solid #80561d;outline-offset:3px}
body #sg-app :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font:inherit;font-size:16px;max-width:100%;border-color:#ad9e87;background:#fffef9;border-radius:6px}
body #sg-app button{min-height:44px;white-space:normal}
body #sg-app button:disabled{cursor:not-allowed}
/* These two decorative emoji are replaced by numbered chapter bookmarks. */
body #sg-app .td-tool-bookmark{font-size:0!important;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:54px;border-radius:2px 4px 0 0;background:#e6a032;color:#202321;clip-path:polygon(0 0,100% 0,100% 100%,50% 86%,0 100%);padding-bottom:7px;vertical-align:middle}
body #sg-app .td-tool-bookmark::before{content:attr(data-chapter);font:24px/1 Georgia,serif}
body #sg-app .td-tool-bookmark img.emoji{display:none!important}
body #sg-app .td-tool-bookmark[data-chapter="02"]{background:#202321;color:#fff4dc}
body #sg-app .td-tool-dialog{max-height:calc(100dvh - 32px);overflow:auto;border-left:5px solid #e6a032;border-radius:5px 14px 14px 5px}
.zo-in-site{--zo-bg:#f8f4eb;--zo-card:#fffdf6;--zo-primary:#e6a032;--zo-line:#d9c9ad;--zo-muted:#655e52;font-family:inherit}
.zo-in-site .zo-q,.zo-in-site .zo-message{border-radius:4px 12px 12px 4px;border-left:5px solid #e6a032;background:#fffdf6;box-shadow:3px 3px 0 #eee5d5}
.zo-in-site .zo-q__kicker,.zo-in-site .zo-step-head{color:#785019}
.zo-in-site .zo-input{background:#fffef9;border-color:#ad9e87;border-radius:6px;font-size:16px}
.zo-in-site .zo-btn,.zo-in-site .zo-seg__btn,.zo-in-site .zo-scale__btn{min-height:44px}
.zo-in-site .zo-steps3__num,.zo-in-site .zo-focus__num{font-family:Georgia,serif;color:#80561d}
.td-book .td-chapter-grid{counter-reset:td-chapter}
.td-book .td-chapter{position:relative;counter-increment:td-chapter;padding:24px;border-radius:4px 12px 12px 4px;border-left:5px solid #c18b37;background:#fffdf6;box-shadow:3px 3px 0 #eee5d5}
.td-book .td-chapter::before{content:counter(td-chapter,decimal-leading-zero);display:block;color:#80561d;font:28px/1.2 Georgia,serif;margin-bottom:16px}
.td-book .td-chapter h3{line-height:1.25;margin-top:0}
.td-book .td-status{border:1px solid #d9c9ad;background:#f5ead4;color:#39352d;font-size:14px}
.td-book .td-edition{border-radius:3px;border-bottom:3px solid #c18b37;background:#fffdf6;min-height:44px}
.td-book .td-chapter .button{font-size:16px;min-height:44px}
@media(max-width:600px){
 body #sg-app :is(.sg-p-8,.sg-p-6){padding:20px 16px}
 body #sg-app .sg-p-4{padding:16px 12px}
 body #sg-app .sg-fixed.sg-inset-0{padding:12px;align-items:center}
 body #sg-app .td-tool-dialog{max-height:calc(100dvh - 24px)}
 body #sg-app .sg-text-2xl{font-size:24px;line-height:1.25}
 .zo-in-site .zo-q{padding:20px 14px}
 .zo-in-site .zo-scale{gap:6px;flex-wrap:wrap}
 .td-book .td-chapter{padding:20px}
}
@media(prefers-reduced-motion:reduce){body #sg-app *, .zo-in-site *{scroll-behavior:auto;transition-duration:0s!important}}

