.family-thunderbird .screen-body { background: #f9f9fb; min-height: 380px; }
.tb-main { position: relative; min-height: 380px; }
.tb-toolbar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #ebebef; border-bottom: 1px solid #d7d7db; }
.tb-search { flex: 1; height: 24px; max-width: 320px; margin: 0 auto; border-radius: 4px; background: #fff; border: 1px solid #cfcfd8; }
.tb-appmenu { width: 30px; height: 26px; border: 0; background: transparent; font-size: 18px; line-height: 1; border-radius: 4px; }
.tb-panes { display: grid; grid-template-columns: 180px 1fr; height: 330px; }
.tb-folders { background: #f0f0f4; border-right: 1px solid #d7d7db; }
.tb-menu, .tb-submenu { list-style: none; margin: 0; padding: 4px 0; background: #fff; border: 1px solid #cfcfd8; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.tb-menu { position: absolute; top: 40px; right: 8px; width: 230px; }
.tb-menu > li { position: relative; padding: 6px 14px; }
.tb-menu b { float: right; font-weight: 400; color: #5b5b66; }
.tb-submenu { position: absolute; top: -4px; right: 100%; margin-right: 4px; width: 200px; }
.tb-submenu li { padding: 6px 14px; }
.tb-setup { max-width: 470px; margin: 0 auto; padding: 22px 24px 20px; background: #fff; min-height: 380px; }
.tb-setup h2 { font-size: 20px; font-weight: 600; margin: 0 0 14px; }
.tb-setup label { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 7px; }
.tb-setup > label, .tb-setup > .tb-row { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.tb-setup fieldset { border: 0; border-top: 1px solid #e0e0e6; margin: 0 0 8px; padding: 8px 4px 2px; }
.tb-setup legend { font-weight: 600; padding: 0 6px 0 0; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; color: #5b5b66; }
.tb-buttons { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tb-buttons .tb-link { margin-right: auto; color: #0060df; text-decoration: underline; }
.tb-btn { padding: 6px 16px; border-radius: 4px; background: #e0e0e6; font-weight: 600; }
.tb-btn.primary { background: #0060df; color: #fff; }
.tb-manual .tb-buttons .tb-btn:first-child { margin-right: auto; }
.tb-setup .check, .tb-prompt .check { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.tb-setup .box, .tb-prompt .box { flex: none; width: 14px; height: 14px; border: 1px solid #8f8f9d; border-radius: 2px; display: inline-block; }
.tb-setup .box.on, .tb-prompt .box.on { background: #0060df; border-color: #0060df; }
.tb-success { text-align: center; padding-top: 60px; }
.tb-success .tb-buttons { justify-content: center; }
.tb-check { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #2ac3a2; color: #fff; font-style: normal; }
.tb-account { font-size: 15px; }
.tb-account { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tb-settings { display: grid; grid-template-columns: 210px 1fr; min-height: 380px; background: #fff; }
.tb-tree { list-style: none; margin: 0; padding: 10px 6px; background: #f0f0f4; border-right: 1px solid #d7d7db; }
.tb-tree li { padding: 5px 8px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-tree-account { font-weight: 600; }
.tb-tree-item { padding-left: 22px !important; }
.tb-tree-smtp { margin-top: 14px; font-weight: 600; }
.tb-tree .is-selected, .tb-listbox .is-selected { background: #0060df; color: #fff; }
.tb-pane { padding: 16px 20px; }
.tb-pane h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.tb-pane h3, .tb-dialog h3 { font-size: 13px; font-weight: 600; margin: 14px 0 8px; border-bottom: 1px solid #e0e0e6; padding-bottom: 4px; }
.tb-pane label, .tb-dialog label { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 7px; }
.tb-pane .plain { padding: 4px 0; }
.tb-smtp-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.tb-listbox { border: 1px solid #8f8f9d; border-radius: 4px; min-height: 120px; padding: 2px; }
.tb-listbox > span { display: block; padding: 4px 6px; border-radius: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-side { display: grid; gap: 6px; align-content: start; }
.tb-dialog-backdrop { min-height: 380px; background: rgba(0,0,0,.25); display: grid; place-items: center; padding: 20px; }
.tb-dialog { width: 440px; background: #fff; border-radius: 8px; padding: 18px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.tb-dialog h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.tb-dialog .tb-buttons { justify-content: flex-end; }
.tb-prompt .check { display: flex; align-items: center; gap: 6px; }
.tb-tree .tb-tree-smtp { white-space: normal; }
.tb-menu > li:not([data-hl-on]) > .tb-submenu { display: none; }

/* ---- visual pass: Thunderbird 128 "Supernova" look ---- */
.family-thunderbird .screen-body.has-chrome { display: grid; grid-template-columns: 38px minmax(0, 1fr); background: #fff; }
.tb-rail { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 12px 0; background: #e9e9ed; border-right: 1px solid #d7d7db; color: #3d3d47; }
.tb-rail .ico { width: 18px; height: 18px; stroke-width: 1.500; }
.tb-rail .tb-rail-end { margin-top: auto; }
.family-thunderbird .screen-body { font-size: 13px; color: #15141a; }
.tb-setup { max-width: 500px; margin: 0; padding: 22px 26px 22px; }
.tb-setup h2 { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.tb-setup > label, .tb-setup > .tb-row { margin-bottom: 14px; gap: 5px; color: #15141a; }
.tb-setup > label .field, .tb-setup > .tb-row .field { max-width: 380px; }
.family-thunderbird .field { min-height: 28px; padding: 5px 8px; border: 1px solid #c9c9d1; border-radius: 3px; }
.family-thunderbird .field.select { background: #e0e0e6; border-color: #e0e0e6; font-weight: 600; }
.family-thunderbird .field.select::after { content: ""; float: right; width: 7px; height: 7px; margin: 3px 3px 0 0; border: solid #3d3d47; border-width: 0 1.500px 1.500px 0; transform: rotate(45deg); }
.family-thunderbird .field.short { width: 4.500em; text-align: right; }
.tb-setup fieldset { margin: 0 0 14px; padding: 12px 10px 4px; border: 0; background: #f4f4f6; border-radius: 3px; }
.tb-setup legend { float: left; width: auto; margin: -22px 0 10px; padding: 3px 7px; border-radius: 3px; background: #0060df; color: #fff; font-size: 10.500px; font-weight: 600; letter-spacing: .020em; }
.tb-setup legend + * { clear: both; }
.tb-setup fieldset label { grid-template-columns: minmax(120px, 42%) minmax(0, 1fr); margin-bottom: 9px; }
.tb-btn { padding: 6px 16px; border-radius: 3px; background: #e0e0e6; font-weight: 400; }
.tb-btn.primary { background: #0060df; font-weight: 600; }
.tb-buttons .tb-link { text-decoration: none; }
.tb-setup .box, .tb-prompt .box { width: 15px; height: 15px; border-radius: 3px; position: relative; }
.tb-setup .box.on::after, .tb-prompt .box.on::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tb-toolbar { background: #e9e9ed; padding: 5px 8px; }
.tb-search { height: 26px; border-color: #c9c9d1; border-radius: 3px; }
.tb-menu, .tb-submenu { border-radius: 6px; border-color: #d7d7db; box-shadow: 0 4px 16px rgba(0, 0, 0, .18); }
.tb-settings { grid-template-columns: 190px 1fr; }
.tb-tree { background: #f9f9fb; }
.tb-tree .is-selected, .tb-listbox .is-selected { background: #d5e5fb; color: #15141a; box-shadow: inset 3px 0 0 #0060df; }
.tb-pane h2 { font-size: 20px; font-weight: 400; }
.tb-pane h3, .tb-dialog h3 { border-bottom: 0; font-size: 14px; }
.tb-dialog { border-radius: 4px; }
.tb-setup fieldset { margin-top: 24px; }
.tb-settings { grid-template-columns: minmax(96px, 190px) minmax(0, 1fr); }
.tb-pane { min-width: 0; }
.tb-pane label, .tb-dialog label { grid-template-columns: minmax(84px, 40%) minmax(0, 1fr); overflow-wrap: anywhere; }
@media (max-width: 480px) { .tb-pane { padding: 12px 10px; } .tb-tree { padding: 8px 3px; font-size: 12px; } .tb-tree li { white-space: normal; overflow-wrap: anywhere; } .tb-tree-item { padding-left: 12px !important; } }

/* ---- Thunderbird 157: the Account Hub, a dialog over the dimmed main window ---- */
.tb-hub-back { min-height: 380px; padding: 16px 12px; background: #8f8f96; display: grid; place-items: center; }
.tb-hub { width: 100%; max-width: 470px; min-height: 340px; display: flex; flex-direction: column; padding: 18px 22px 10px; border-radius: 4px; background: linear-gradient(160deg, #eef4fd, #e3f1fb 55%, #eef3fd); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.tb-hub h2 { margin: 4px 0 10px; font-size: 16px; font-weight: 500; text-align: center; }
.tb-hub-brand { margin: 0 0 8px; text-align: center; }
.tb-hub-brand span { display: block; font-size: 11px; font-weight: 600; }
.tb-hub-brand strong { font-size: 21px; font-weight: 400; }
.tb-hub-tm { margin: 0; text-align: center; }
.tb-hub-tm span { display: inline-block; padding: 3px 8px; border: 1px solid #0060df; border-radius: 3px; background: #fff; color: #0060df; font-weight: 600; font-size: 12px; }
.tb-hub-or { margin: 4px 0; text-align: center; font-size: 11px; color: #5b5b66; }
.tb-hub-note { margin: 0 auto 12px; width: 100%; max-width: 340px; padding: 5px 10px; border: 1px solid #0060df; border-radius: 3px; background: #fff; color: #0b3a7e; font-size: 11.500px; font-weight: 600; text-align: center; }
.tb-hub-note.is-good { border-color: #2f7a3c; color: #1f4d27; background: #f2fbf3; }
.tb-hub-form { width: 100%; max-width: 330px; margin: 0 auto; }
.tb-hub-form.is-narrow { max-width: 270px; }
.tb-hub-form.is-mid { margin-top: 44px; }
.tb-hub-form.is-centre { text-align: center; }
.tb-hub-form label, .tb-hub-row { display: block; margin-bottom: 12px; font-size: 11.500px; font-weight: 600; }
.tb-hub-form label .field, .tb-hub-row .field { display: block; margin-top: 3px; background: #fff; font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.tb-hub-form label .field.select { background: #f4f5f8; border-color: #c9c9d1; font-weight: 400; }
.tb-hub-form label small { display: block; margin-top: 3px; font-size: 10.500px; font-weight: 400; color: #5b5b66; }
.tb-hub-form p { margin: 0 0 10px; }
.tb-hub-a { color: #0060df; text-decoration: underline; }
.tb-hub-caps { font-size: 10.500px; font-weight: 700; text-transform: uppercase; }
.tb-hub-legend { color: #0b3a7e; font-weight: 600; }
.tb-hub .check { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 12px; }
.tb-hub .box { flex: none; position: relative; width: 15px; height: 15px; border: 1px solid #8f8f9d; border-radius: 3px; display: inline-block; }
.tb-hub .box.on { background: #0060df; border-color: #0060df; }
.tb-hub .box.on::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tb-hub-adv { margin: auto 0 0; text-align: right; font-size: 11.500px; }
.tb-hub .tb-buttons { justify-content: flex-end; margin-top: auto; padding-top: 12px; }
.tb-hub-adv + .tb-buttons { margin-top: 0; }
.tb-hub .tb-buttons.is-split { justify-content: space-between; }
.tb-hub .tb-btn { min-width: 84px; padding: 6px 14px; background: #fff; border: 1px solid #d7d7db; text-align: center; font-weight: 600; }
.tb-hub .tb-btn.primary { background: #0060df; border-color: #0060df; }
.tb-hub-foot { margin: 10px 0 0; text-align: center; font-size: 11px; color: #0060df; }
.tb-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 340px; margin: 34px auto 0; }
.tb-tile { position: relative; padding: 14px 6px 12px; border: 1px solid #7aa7e6; border-radius: 4px; background: #fff; text-align: center; }
.tb-tile strong { display: block; margin-bottom: 14px; color: #0b3a7e; font-size: 12px; }
.tb-tile span { font-size: 11px; }
.tb-tile em { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); padding: 1px 5px; border-radius: 2px; background: #0060df; color: #fff; font-size: 8.500px; font-style: normal; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.tb-tile.is-on { border-color: #0060df; box-shadow: inset 0 34px 0 #0060df; }
.tb-tile.is-on strong { color: #fff; }

/* the page with the settings Thunderbird found by itself (both versions) */
.tb-found { margin: 0 0 12px; padding: 6px 10px; border-radius: 3px; background: #2f8a3f; color: #fff; font-size: 12px; }
.tb-found::before { content: "\2713"; margin-right: 8px; }
.tb-found-head { margin: 0 0 8px; font-weight: 600; }
.tb-config { margin: 0 0 8px; padding: 8px 10px; border: 1px solid #d7d7db; border-radius: 3px; background: #f0f0f4; font-size: 12px; }
.tb-config.is-on { background: #cfe2fb; border-color: #7aa7e6; }
.tb-config p { margin: 0 0 4px; }
.tb-config-desc { margin-left: 22px !important; }
.tb-config-row { display: grid; margin: 6px 0 0 22px !important; }
.tb-config-row span { overflow-wrap: anywhere; }
.tb-radio { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 1px solid #5b5b66; border-radius: 50%; vertical-align: -1px; background: #fff; }
.tb-radio.is-on { border-color: #0060df; box-shadow: inset 0 0 0 3px #fff; background: #0060df; }
.tb-hub .tb-config { background: #fff; }
.tb-hub .tb-config.is-on { background: #e3eefc; }
