/* TrueWriter web handbook v1.3.0 · FIX3 fixed navigation + improved reading typography */
:root {
    --tw-hb-bg: #0d1114;
    --tw-hb-panel: #13191d;
    --tw-hb-panel-2: #181f24;
    --tw-hb-paper: #fbfaf6;
    --tw-hb-paper-2: #f5f2e9;
    --tw-hb-text: #1b2329;
    --tw-hb-muted: #64727c;
    --tw-hb-line: rgba(109, 122, 132, .22);
    --tw-hb-gold: #d7a72e;
    --tw-hb-gold-soft: #f4e5b2;
    --tw-hb-radius: 18px;
    --tw-hb-sidebar: 310px;
    --tw-hb-topbar: 68px;
    --tw-hb-footer-overlap: 0px;
}
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body.tw-handbook-body { margin: 0; background: var(--tw-hb-bg); color: #e6ecef; min-height: 100vh; }
body.tw-handbook-body.is-hb-menu-open { overflow: hidden; }
.tw-hb-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 1300; background: rgba(255,255,255,.06); }
.tw-hb-progress span { display: block; width: 0; height: 100%; background: var(--tw-hb-gold); transition: width .08s linear; }
.tw-hb-topbar { position: fixed; inset: 0 0 auto 0; z-index: 1200; height: var(--tw-hb-topbar); box-sizing: border-box; padding: 0 clamp(16px, 3vw, 42px); display: flex; align-items: center; justify-content: space-between; gap: 18px; background: rgba(13,17,20,.96); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(18px); }
.tw-hb-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.tw-hb-brand__logo { width: 36px; height: 36px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 1px rgba(215,167,46,.3); }
.tw-hb-brand__logo img { width: 100%; height: 100%; object-fit: cover; }
.tw-hb-brand span:last-child { display: grid; line-height: 1.05; }
.tw-hb-brand strong { font-size: .98rem; letter-spacing: .02em; }
.tw-hb-brand small { margin-top: 4px; color: #89959c; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.tw-hb-topbar__meta { display: flex; align-items: center; gap: 8px; }
.tw-hb-version { color: var(--tw-hb-gold); border: 1px solid rgba(215,167,46,.32); background: rgba(215,167,46,.08); border-radius: 999px; padding: 7px 10px; font-size: .75rem; font-weight: 800; letter-spacing: .06em; }
.tw-hb-topbtn, .tw-hb-hero-btn { appearance: none; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #e9eef1; min-height: 38px; padding: 9px 13px; border-radius: 10px; font: inherit; font-size: .82rem; font-weight: 750; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.tw-hb-topbtn:hover, .tw-hb-hero-btn:hover { border-color: rgba(215,167,46,.58); background: rgba(215,167,46,.08); transform: translateY(-1px); }
.tw-hb-topbtn--primary, .tw-hb-hero-btn--primary { background: var(--tw-hb-gold); border-color: var(--tw-hb-gold); color: #171b1d; }
.tw-hb-topbtn--primary:hover, .tw-hb-hero-btn--primary:hover { background: #e5b53c; color: #111; }
.tw-hb-topbtn--menu { display: none; }
.tw-hb-shell { width: min(1680px, 100%); margin: 0 auto; padding-top: var(--tw-hb-topbar); display: grid; grid-template-columns: var(--tw-hb-sidebar) minmax(0, 1fr); align-items: start; }
.tw-hb-sidebar { position: fixed; z-index: 1100; top: var(--tw-hb-topbar); bottom: 0; left: max(0px, calc((100vw - 1680px) / 2)); width: var(--tw-hb-sidebar); height: auto; box-sizing: border-box; border-right: 1px solid rgba(255,255,255,.08); background: #0f1417; }
.tw-hb-sidebar__inner { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.tw-hb-search { padding: 18px 16px 12px; border-bottom: 1px solid rgba(255,255,255,.07); position: relative; }
.tw-hb-search label { display: block; margin-bottom: 8px; color: #a5b0b6; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.tw-hb-search__field { position: relative; }
.tw-hb-search input { width: 100%; box-sizing: border-box; border: 1px solid rgba(255,255,255,.1); background: #161c20; color: #edf2f4; outline: none; border-radius: 10px; min-height: 42px; padding: 10px 42px 10px 12px; font: inherit; font-size: .84rem; }
.tw-hb-search input:focus { border-color: rgba(215,167,46,.68); box-shadow: 0 0 0 3px rgba(215,167,46,.09); }
.tw-hb-search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); min-width: 22px; text-align: center; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; color: #718087; font-size: .72rem; background: #101518; }
.tw-hb-search-results { position: absolute; left: 16px; right: 16px; top: calc(100% - 3px); max-height: min(60vh, 520px); overflow: auto; padding: 7px; background: #171e22; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.35); z-index: 20; }
.tw-hb-search-result { width: 100%; border: 0; background: transparent; color: #dce4e8; text-align: left; padding: 10px; border-radius: 8px; cursor: pointer; display: grid; gap: 4px; }
.tw-hb-search-result:hover, .tw-hb-search-result:focus { background: rgba(215,167,46,.09); outline: none; }
.tw-hb-search-result strong { color: #fff; font-size: .8rem; }
.tw-hb-search-result span { color: #87949b; font-size: .74rem; line-height: 1.35; }
.tw-hb-search-empty { padding: 12px; color: #859198; font-size: .8rem; }
.tw-hb-nav { flex: 1; min-height: 0; overflow: auto; padding: 10px 8px 16px; scrollbar-width: thin; }
.tw-hb-nav a { display: block; color: #99a6ad; text-decoration: none; border-radius: 8px; transition: color .12s ease, background .12s ease; }
.tw-hb-nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.tw-hb-nav a.is-active { color: #f4ce69; background: rgba(215,167,46,.1); }
.tw-hb-nav__chapter { margin-top: 4px; padding: 9px 9px; font-size: .79rem; font-weight: 800; line-height: 1.25; }
.tw-hb-nav__section { margin-left: 11px; padding: 6px 9px 6px 14px; border-left: 1px solid rgba(255,255,255,.09); font-size: .72rem; line-height: 1.3; }
.tw-hb-sidebar__footer { display: grid; gap: 5px; padding: 12px 16px 18px; border-top: 1px solid rgba(255,255,255,.07); }
.tw-hb-sidebar__footer a { color: #839097; text-decoration: none; font-size: .76rem; }
.tw-hb-sidebar__footer a:hover { color: #f0c85f; }
.tw-hb-main { grid-column: 2; min-width: 0; padding: clamp(22px, 4vw, 56px) clamp(16px, 4vw, 58px) 70px; }
.tw-hb-webhero { max-width: 1040px; margin: 0 auto 30px; padding: clamp(22px, 4vw, 42px); border: 1px solid rgba(215,167,46,.2); border-radius: 22px; background: radial-gradient(circle at 90% 0%, rgba(215,167,46,.13), transparent 34%), linear-gradient(145deg,#141a1e,#101518); box-shadow: 0 28px 80px rgba(0,0,0,.2); display: flex; justify-content: space-between; gap: 28px; align-items: end; }
.tw-hb-eyebrow { color: var(--tw-hb-gold); font-size: .75rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.tw-hb-webhero h1 { margin: 8px 0 10px; color: #fff; font-size: clamp(2rem, 4vw, 3.8rem); line-height: .98; letter-spacing: -.04em; }
.tw-hb-webhero p { max-width: 720px; margin: 0; color: #aeb8bd; font-size: clamp(.95rem, 1.5vw, 1.08rem); line-height: 1.65; }
.tw-hb-webhero__actions { display: flex; flex-wrap: wrap; gap: 9px; flex: 0 0 auto; }
.tw-hb-article { max-width: 1040px; margin: 0 auto; background: var(--tw-hb-paper); color: var(--tw-hb-text); padding: clamp(24px, 5vw, 72px); border-radius: 22px; box-shadow: 0 28px 90px rgba(0,0,0,.22); overflow-wrap: anywhere; }
.tw-hb-article > p:first-child { margin-top: 0; color: var(--tw-hb-gold); font-size: .78rem; font-weight: 900; letter-spacing: .14em; }
.tw-hb-article > p:nth-child(2) { margin: 3px 0 5px; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 850; line-height: 1; letter-spacing: -.035em; }
.tw-hb-article > p:nth-child(3) { color: #59666f; font-size: 1.08rem; }
.tw-hb-article h1, .tw-hb-article h2, .tw-hb-article h3 { position: relative; color: #11181d; scroll-margin-top: 92px; }
.tw-hb-article h2[data-handbook-heading="1"] { margin: 3.3rem 0 1rem; padding-top: .55rem; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.12; letter-spacing: -.025em; border-top: 1px solid #ddd8ca; }
.tw-hb-article h2[data-handbook-heading="1"]:first-of-type { margin-top: 2.5rem; }
.tw-hb-article h3[data-handbook-heading="1"] { margin: 2.1rem 0 .7rem; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.25; }
.tw-hb-article h3 { margin: 1.6rem 0 .5rem; font-size: 1.08rem; }
.tw-hb-article p, .tw-hb-article li { font-size: 1rem; line-height: 1.72; }
.tw-hb-article p { margin: .72rem 0; }
.tw-hb-article ul, .tw-hb-article ol { padding-left: 1.45rem; }
.tw-hb-article li { margin: .28rem 0; }
.tw-hb-anchor { position: absolute; right: 0; top: .45rem; border: 0; background: transparent; color: #9ba3a7; padding: 4px 6px; border-radius: 7px; cursor: pointer; opacity: 0; transition: opacity .12s ease, background .12s ease, color .12s ease; font-size: .75rem; }
.tw-hb-article h2:hover .tw-hb-anchor, .tw-hb-article h3:hover .tw-hb-anchor, .tw-hb-anchor:focus { opacity: 1; }
.tw-hb-anchor:hover { color: #8e6810; background: #f3ead2; }
.tw-hb-figure { margin: 1.55rem 0 2rem; }
.tw-hb-image { display: block; width: 100%; height: auto; border: 1px solid #d8d9d6; border-radius: 13px; box-shadow: 0 12px 32px rgba(25,31,35,.1); cursor: zoom-in; background: #111; }
.tw-hb-figure:has(img[height][width]) { text-align: center; }
.tw-hb-figure img[width="393"] { width: min(393px, 100%); margin-inline: auto; }
.tw-hb-figure figcaption { margin-top: .6rem; text-align: center; color: #6c7880; font-size: .82rem; font-style: italic; line-height: 1.45; }
.tw-hb-article table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 1.7rem; font-size: .9rem; }
.tw-hb-article th, .tw-hb-article td { border: 1px solid #dddcd5; padding: .72rem .78rem; vertical-align: top; text-align: left; line-height: 1.5; }
.tw-hb-article th { background: #f2f0e8; }
.tw-hb-callout { border-collapse: separate !important; border-spacing: 0; border: 1px solid #dec36f; border-left: 4px solid var(--tw-hb-gold); border-radius: 11px; overflow: hidden; background: #fff8e5; }
.tw-hb-callout th, .tw-hb-callout td { border: 0 !important; background: transparent !important; font-weight: 400; }
.tw-hb-callout--principle { border-color: #89b294; border-left-color: #67966f; background: #edf7ef; }
.tw-hb-callout--info { border-color: #90abc1; border-left-color: #6f93b6; background: #eef5fb; }
.tw-hb-callout--important { border-color: #d89f90; border-left-color: #b45c46; background: #fff0ed; }
.tw-hb-callout--tip { border-color: #dec36f; border-left-color: var(--tw-hb-gold); background: #fff8e5; }
.tw-hb-article .tw-hb-table { display: table; }
.tw-hb-article mark { background: #ffdf83; color: #1c1d1d; padding: 0 .08em; }
.tw-hb-end { max-width: 1040px; margin: 22px auto 0; color: #758188; font-size: .78rem; display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; }
.tw-hb-end strong { color: #d4b154; }
.tw-hb-end a { color: #a8b3b8; }
.tw-hb-lightbox { width: min(96vw, 1800px); max-width: none; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 14px; background: #0d1114; color: #fff; box-shadow: 0 34px 100px rgba(0,0,0,.7); }
.tw-hb-lightbox::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(7px); }
.tw-hb-lightbox img { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; object-fit: contain; border-radius: 10px; }
.tw-hb-lightbox p { margin: 10px 44px 0 4px; color: #aeb8bd; font-size: .84rem; }
.tw-hb-lightbox__close { position: absolute; top: 16px; right: 16px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(0,0,0,.62); color: #fff; font-size: 1.55rem; line-height: 1; cursor: pointer; }
.tw-hb-toast { position: fixed; z-index: 1500; left: 50%; bottom: 24px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; padding: 10px 14px; border-radius: 9px; background: #1c2429; color: #f2f5f6; border: 1px solid rgba(215,167,46,.28); font-size: .8rem; transition: opacity .16s ease, transform .16s ease; }
.tw-hb-toast.is-visible { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 980px) {
    :root { --tw-hb-topbar: 62px; }
    .tw-hb-shell { grid-template-columns: 1fr; }
    .tw-hb-main { grid-column: 1; }
    .tw-hb-sidebar { position: fixed; z-index: 1250; top: var(--tw-hb-topbar); left: 0; bottom: 0; width: min(88vw, 340px); height: auto; transform: translateX(-104%); transition: transform .2s ease; box-shadow: 24px 0 60px rgba(0,0,0,.35); }
    body.is-hb-menu-open .tw-hb-sidebar { transform: translateX(0); }
    body.is-hb-menu-open::after { content: ''; position: fixed; inset: var(--tw-hb-topbar) 0 0; z-index: 1240; background: rgba(0,0,0,.56); }
    .tw-hb-topbtn--menu { display: inline-flex; }
    .tw-hb-webhero { align-items: flex-start; flex-direction: column; }
    .tw-hb-webhero__actions { width: 100%; }
}
@media (max-width: 700px) {
    .tw-hb-topbar { padding-inline: 12px; }
    .tw-hb-brand small, .tw-hb-version, .tw-hb-topbar__meta > .tw-hb-topbtn:not(.tw-hb-topbtn--menu):not(.tw-hb-topbtn--primary) { display: none; }
    .tw-hb-topbtn { min-height: 36px; padding: 8px 10px; font-size: .75rem; }
    .tw-hb-main { padding: 14px 10px 52px; }
    .tw-hb-webhero { margin-bottom: 12px; padding: 22px 18px; border-radius: 16px; }
    .tw-hb-webhero h1 { font-size: 2.25rem; }
    .tw-hb-webhero__actions { display: grid; grid-template-columns: 1fr; }
    .tw-hb-article { border-radius: 15px; padding: 25px 17px 38px; }
    .tw-hb-article p, .tw-hb-article li { font-size: .95rem; line-height: 1.66; }
    .tw-hb-article h2[data-handbook-heading="1"] { font-size: 1.58rem; }
    .tw-hb-article h3[data-handbook-heading="1"] { font-size: 1.18rem; }
    .tw-hb-article table.tw-hb-table { display: block; overflow-x: auto; white-space: normal; }
    .tw-hb-anchor { opacity: .5; }
}
/* ------------------------------------------------------------------
   TrueWriter handbook FIX2
   Desktop: topbar + handbook navigation stay in place while the
   document scrolls. Only the chapter list inside the navigation owns
   its scroll position. Mobile keeps the existing drawer behaviour.
   ------------------------------------------------------------------ */

@media (min-width: 981px) {
    body.tw-handbook-body .tw-hb-topbar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
    }

    body.tw-handbook-body .tw-hb-sidebar {
        position: fixed !important;
        top: var(--tw-hb-topbar) !important;
        bottom: var(--tw-hb-footer-overlap, 0px) !important;
        left: max(0px, calc((100vw - 1680px) / 2)) !important;
        width: var(--tw-hb-sidebar) !important;
        height: auto !important;
        max-height: calc(100vh - var(--tw-hb-topbar) - var(--tw-hb-footer-overlap, 0px)) !important;
        overflow: hidden !important;
    }

    body.tw-handbook-body .tw-hb-sidebar__inner {
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    body.tw-handbook-body .tw-hb-search,
    body.tw-handbook-body .tw-hb-sidebar__footer {
        flex: 0 0 auto;
    }

    body.tw-handbook-body .tw-hb-nav {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }

    body.tw-handbook-body .tw-hb-main {
        grid-column: 2 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
    .tw-hb-topbar, .tw-hb-sidebar, .tw-hb-progress, .tw-hb-webhero, .tw-hb-toast, .tw-hb-lightbox, body.tw-handbook-body > footer { display: none !important; }
    body.tw-handbook-body { background: white; }
    .tw-hb-shell { display: block; }
    .tw-hb-main { padding: 0; }
    .tw-hb-article { max-width: none; box-shadow: none; padding: 0; }
}

/* ------------------------------------------------------------------
   TrueWriter handbook FIX1
   Strong component isolation from global Truepublishing/main.css.
   The handbook paper must always remain readable on its light surface.
   ------------------------------------------------------------------ */

body.tw-handbook-body .tw-hb-article {
    color: #273137 !important;
    background: #fbfaf6 !important;
}

body.tw-handbook-body .tw-hb-article p,
body.tw-handbook-body .tw-hb-article li,
body.tw-handbook-body .tw-hb-article dd,
body.tw-handbook-body .tw-hb-article dt,
body.tw-handbook-body .tw-hb-article span,
body.tw-handbook-body .tw-hb-article blockquote {
    color: inherit;
}

body.tw-handbook-body .tw-hb-article h1,
body.tw-handbook-body .tw-hb-article h2,
body.tw-handbook-body .tw-hb-article h3,
body.tw-handbook-body .tw-hb-article h4,
body.tw-handbook-body .tw-hb-article h5,
body.tw-handbook-body .tw-hb-article h6 {
    color: #11181d !important;
}

body.tw-handbook-body .tw-hb-article a:not(.tw-hb-anchor) {
    color: #7a5810;
    text-decoration-color: rgba(122, 88, 16, .35);
}

body.tw-handbook-body .tw-hb-article strong,
body.tw-handbook-body .tw-hb-article b {
    color: #192126;
}

/* Normal content tables. Global site table styles must not leak in. */
body.tw-handbook-body .tw-hb-article table.tw-hb-table {
    color: #273137 !important;
    background: #fffdfa !important;
    border-collapse: collapse !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-table thead,
body.tw-handbook-body .tw-hb-article table.tw-hb-table tbody,
body.tw-handbook-body .tw-hb-article table.tw-hb-table tr,
body.tw-handbook-body .tw-hb-article table.tw-hb-table tr.header,
body.tw-handbook-body .tw-hb-article table.tw-hb-table tr.odd,
body.tw-handbook-body .tw-hb-article table.tw-hb-table tr.even {
    color: #273137 !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-table th {
    color: #1d272d !important;
    background: #f0eee6 !important;
    font-weight: 750 !important;
    border-color: #d8d7cf !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-table td {
    color: #334047 !important;
    background: #fffdfa !important;
    border-color: #dfded7 !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-table tr:nth-child(even) td {
    background: #f8f6f0 !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-table th *,
body.tw-handbook-body .tw-hb-article table.tw-hb-table td * {
    color: inherit !important;
}

/* Information / principle / warning boxes generated from the handbook DOCX. */
body.tw-handbook-body .tw-hb-article table.tw-hb-callout {
    color: #29343a !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-callout thead,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout tbody,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout tr,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout tr.header,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout tr.odd,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout tr.even,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout th,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout td {
    color: #29343a !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-callout th,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout td {
    background: transparent !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-callout strong,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout b,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout th strong,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout td strong {
    color: #202a2f !important;
    font-weight: 800 !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-callout * {
    text-shadow: none !important;
}

/* Preserve the intended distinct callout backgrounds even if main.css styles rows. */
body.tw-handbook-body .tw-hb-article table.tw-hb-callout,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout--tip {
    background: #fff8e5 !important;
}
body.tw-handbook-body .tw-hb-article table.tw-hb-callout--principle {
    background: #edf7ef !important;
}
body.tw-handbook-body .tw-hb-article table.tw-hb-callout--info {
    background: #eef5fb !important;
}
body.tw-handbook-body .tw-hb-article table.tw-hb-callout--important {
    background: #fff0ed !important;
}

/* The sidebar owns its own scroll position. It must never affect page scroll. */
body.tw-handbook-body .tw-hb-nav {
    overscroll-behavior: contain;
    scroll-behavior: auto;
}

/* Global site footer/layout rules must not constrain handbook scrolling. */
html:has(body.tw-handbook-body),
body.tw-handbook-body {
    overflow-x: hidden;
    overflow-y: auto;
}

body.tw-handbook-body .tw-hb-shell,
body.tw-handbook-body .tw-hb-main,
body.tw-handbook-body .tw-hb-article {
    min-height: 0;
}


/* ------------------------------------------------------------------
   TrueWriter handbook FIX3
   Reading typography: clearer, less narrow and less visually thin.
   Deliberately scoped to the handbook so global Truepublishing styles
   cannot replace the reading font or reduce contrast.
   ------------------------------------------------------------------ */

body.tw-handbook-body,
body.tw-handbook-body button,
body.tw-handbook-body input,
body.tw-handbook-body textarea,
body.tw-handbook-body select {
    font-family: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

/* Main reading surface */
body.tw-handbook-body .tw-hb-article {
    color: #253139 !important;
    font-family: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
}

body.tw-handbook-body .tw-hb-article p,
body.tw-handbook-body .tw-hb-article li,
body.tw-handbook-body .tw-hb-article dd,
body.tw-handbook-body .tw-hb-article dt,
body.tw-handbook-body .tw-hb-article blockquote {
    font-family: inherit !important;
    font-size: 1.035rem;
    font-weight: 500;
    line-height: 1.78;
    letter-spacing: 0;
    color: #344149 !important;
}

body.tw-handbook-body .tw-hb-article strong,
body.tw-handbook-body .tw-hb-article b {
    color: #172127 !important;
    font-weight: 700 !important;
}

/* Headings: strong hierarchy without looking condensed. */
body.tw-handbook-body .tw-hb-article h1,
body.tw-handbook-body .tw-hb-article h2,
body.tw-handbook-body .tw-hb-article h3,
body.tw-handbook-body .tw-hb-article h4,
body.tw-handbook-body .tw-hb-article h5,
body.tw-handbook-body .tw-hb-article h6 {
    font-family: "Segoe UI", "Segoe UI Variable Display", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -.018em;
}

body.tw-handbook-body .tw-hb-article h2[data-handbook-heading="1"] {
    line-height: 1.16;
}

body.tw-handbook-body .tw-hb-article h3[data-handbook-heading="1"],
body.tw-handbook-body .tw-hb-article h4 {
    line-height: 1.3;
}

/* Title block inside the paper. */
body.tw-handbook-body .tw-hb-article > p:first-child {
    font-size: .8rem;
    font-weight: 800 !important;
    letter-spacing: .11em;
}

body.tw-handbook-body .tw-hb-article > p:nth-child(2) {
    color: #172127 !important;
    font-family: "Segoe UI", "Segoe UI Variable Display", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    font-weight: 750 !important;
    letter-spacing: -.025em;
}

body.tw-handbook-body .tw-hb-article > p:nth-child(3) {
    color: #4e5d66 !important;
    font-size: 1.095rem;
    font-weight: 500;
}

/* Tables and information boxes need the same visual weight as body text. */
body.tw-handbook-body .tw-hb-article table,
body.tw-handbook-body .tw-hb-article table.tw-hb-table,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout {
    font-family: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-table th,
body.tw-handbook-body .tw-hb-article table.tw-hb-table td,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout th,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout td {
    font-size: .94rem;
    font-weight: 500;
    line-height: 1.58;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-table th {
    font-weight: 700 !important;
    color: #1c282e !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-table td {
    color: #344149 !important;
}

body.tw-handbook-body .tw-hb-article table.tw-hb-callout th,
body.tw-handbook-body .tw-hb-article table.tw-hb-callout td {
    color: #2d3b42 !important;
}

/* Figure captions should remain subordinate, but still crisp. */
body.tw-handbook-body .tw-hb-figure figcaption {
    color: #5d6b73 !important;
    font-family: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    font-size: .855rem;
    font-weight: 500;
    line-height: 1.52;
}

/* Sidebar: a little larger and heavier for long reading sessions. */
body.tw-handbook-body .tw-hb-nav a,
body.tw-handbook-body .tw-hb-sidebar__footer a,
body.tw-handbook-body .tw-hb-search label,
body.tw-handbook-body .tw-hb-search input,
body.tw-handbook-body .tw-hb-search-result {
    font-family: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
}

body.tw-handbook-body .tw-hb-nav a {
    color: #aab6bc;
    font-weight: 500;
}

body.tw-handbook-body .tw-hb-nav__chapter {
    font-size: .805rem;
    font-weight: 700;
    line-height: 1.32;
}

body.tw-handbook-body .tw-hb-nav__section {
    font-size: .745rem;
    font-weight: 500;
    line-height: 1.38;
}

body.tw-handbook-body .tw-hb-nav a.is-active {
    color: #f5cd63;
    font-weight: 700;
}

body.tw-handbook-body .tw-hb-search input {
    font-size: .86rem;
    font-weight: 500;
}

body.tw-handbook-body .tw-hb-sidebar__footer a {
    color: #929fa6;
    font-size: .78rem;
    font-weight: 500;
}

/* Hero copy and fixed header also become slightly crisper. */
body.tw-handbook-body .tw-hb-webhero h1 {
    font-family: "Segoe UI", "Segoe UI Variable Display", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
    font-weight: 750;
    letter-spacing: -.03em;
}

body.tw-handbook-body .tw-hb-webhero p {
    color: #bbc4c9;
    font-weight: 500;
}

body.tw-handbook-body .tw-hb-brand strong,
body.tw-handbook-body .tw-hb-topbtn,
body.tw-handbook-body .tw-hb-hero-btn,
body.tw-handbook-body .tw-hb-version {
    font-family: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
}

@media (max-width: 700px) {
    body.tw-handbook-body .tw-hb-article p,
    body.tw-handbook-body .tw-hb-article li,
    body.tw-handbook-body .tw-hb-article dd,
    body.tw-handbook-body .tw-hb-article dt,
    body.tw-handbook-body .tw-hb-article blockquote {
        font-size: .99rem;
        line-height: 1.72;
    }
}


/* ------------------------------------------------------------------
   TrueWriter handbook FIX4
   Footer-aware desktop sidebar. JavaScript updates
   --tw-hb-footer-overlap while the global Truepublishing footer enters
   the viewport. The sidebar therefore never overlays the site footer.
   ------------------------------------------------------------------ */
@media (min-width: 981px) {
    body.tw-handbook-body .tw-hb-sidebar {
        min-height: 0 !important;
        will-change: bottom, max-height;
    }

    body.tw-handbook-body .tw-hb-sidebar__inner,
    body.tw-handbook-body .tw-hb-nav {
        min-height: 0 !important;
    }
}
