/* Loaded after page styles. Both palettes retain the existing Bootstrap layout. */
.btn { white-space: normal; overflow-wrap: anywhere; }
.navbar-account { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-scroll { max-width: 100%; overflow-x: auto; margin-bottom: 20px; }
.table-scroll > .table { margin-bottom: 0; min-width: 680px; }
.debug-table-scroll > .table { min-width: 540px; }
.table-scroll th { white-space: nowrap; }
.table-scroll td, .table-scroll caption { overflow-wrap: anywhere; }
.table-scroll td { min-width: 64px; max-width: 360px; }
.table-scroll .text-nowrap { white-space: nowrap; overflow-wrap: normal; }
.table-scroll .submission-source { min-width: 240px; }
.table-scroll:focus-visible { outline: 2px solid #337ab7; outline-offset: 2px; }
.panel > .table-scroll:last-child { margin-bottom: 0; }
.lab-description { overflow-wrap: anywhere; }
.lab-description img { max-width: 100%; height: auto; }
.lab-description table { display: block; max-width: 100%; overflow-x: auto; }
.lab-description th { white-space: nowrap; }
.lab-description td { min-width: 80px; }
.modal-body { overflow-wrap: anywhere; }
.artifacts-list .modal-dialog { width: auto; max-width: 960px; }
.vivado-picker-toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.vivado-picker-toolbar label { flex: 1; min-width: 170px; margin: 0; }
.vivado-picker-toolbar > input { flex: 1; min-width: 180px; }
.vivado-picker-files { max-height: 45vh; overflow-y: auto; margin: 12px 0; }
.vivado-picker-file { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #8795a3; border-radius: 4px; margin-bottom: 8px; cursor: pointer; }
.vivado-picker-file span { min-width: 0; }
.vivado-picker-file strong, .vivado-picker-file small { display: block; overflow-wrap: anywhere; }
.vivado-picker-file small { font-weight: normal; margin-top: 4px; }
.vivado-picker-selected { border-color: #337ab7; box-shadow: inset 3px 0 #337ab7; }
.vivado-picker-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
@media (min-width: 768px) {
  .artifacts-list .modal-dialog { width: calc(100% - 60px); }
}
.submission-details .media-body { overflow-wrap: anywhere; }
.submission-details .media-body pre { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.board-stage { min-height: 480px; }
.debug-tools { margin-bottom: 24px; }
#ttl-group0 { width: 100%; }
.serial-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 15px; }
.serial-actions > .col-md-4 { width: auto; float: none; padding: 0; }
.serial-actions p { margin: 0; }
#ttl-group0 .btn, #ttl-group1 .btn { white-space: nowrap; overflow-wrap: normal; }
.dvi_output { background: #fff; border: 1px solid #7c8ba0; border-radius: 4px; padding: 3px 6px; }
/* Alertify captures its initial width into inline min/max widths during resize. */
.alertify.ajs-resizable .ajs-dialog { min-width: 0 !important; max-width: calc(100vw - 32px) !important; max-height: calc(100vh - 32px); }
.label { display: inline-block; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }

html[data-theme="light"] { color-scheme: light; }
[data-theme="light"] a, [data-theme="light"] .btn-link { color: #215e94; }
[data-theme="light"] a:hover, [data-theme="light"] a:focus { color: #164875; }
[data-theme="light"] .navbar-default .navbar-brand,
[data-theme="light"] .navbar-default .navbar-nav > li > a { color: #606060; }
[data-theme="light"] .text-muted, [data-theme="light"] .help-block,
[data-theme="light"] caption { color: #626262; }
[data-theme="light"] .text-warning { color: #7b5d26; }
[data-theme="light"] .form-control { border-color: #8693a3; }
[data-theme="light"] .btn-primary, [data-theme="light"] .label-primary { background-color: #28659a; color: #fff; }
[data-theme="light"] .btn-primary:hover, [data-theme="light"] .btn-primary:focus { background-color: #20527e; color: #fff; }
[data-theme="light"] .btn-success, [data-theme="light"] .label-success { background-color: #287a3e; border-color: #216634; color: #fff; }
[data-theme="light"] .btn-success:hover, [data-theme="light"] .btn-success:focus { background-color: #205f32; color: #fff; }
[data-theme="light"] .btn-info, [data-theme="light"] .label-info { background-color: #246a85; border-color: #1d566c; color: #fff; }
[data-theme="light"] .btn-info:hover, [data-theme="light"] .btn-info:focus { background-color: #1d566c; color: #fff; }
[data-theme="light"] .btn-warning, [data-theme="light"] .label-warning { background-color: #f0c56e; border-color: #c69a43; color: #3c2b0c; }
[data-theme="light"] .btn-warning:hover, [data-theme="light"] .btn-warning:focus { background-color: #e3b458; color: #3c2b0c; }
[data-theme="light"] .btn-danger, [data-theme="light"] .label-danger { background-color: #b33d3a; border-color: #9a302e; color: #fff; }
[data-theme="light"] .btn-danger:hover, [data-theme="light"] .btn-danger:focus { background-color: #9a302e; color: #fff; }
[data-theme="light"] .label-default { background: #626262; color: #fff; }
[data-theme="light"] .nav-pills > li.active > a,
[data-theme="light"] .list-group-item.active { color: #fff; }
[data-theme="light"] .hljs-comment, [data-theme="light"] .hljs-quote { color: #636363; }
[data-theme="light"] .hljs-literal { color: #397300; }
[data-theme="light"] .hljs-regexp, [data-theme="light"] .hljs-symbol,
[data-theme="light"] .hljs-variable, [data-theme="light"] .hljs-template-variable,
[data-theme="light"] .hljs-selector-attr, [data-theme="light"] .hljs-selector-pseudo,
[data-theme="light"] .hljs-link { color: #993d53; }
[data-theme="light"] .hljs-meta-string { color: #286a86; }
[data-theme="light"] body > p, [data-theme="light"] #hint { color: #636363; }
.theme-toggle { margin-right: 12px; }
.theme-toggle[data-theme-select] { cursor: pointer; max-width: 100%; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:focus-visible { outline: 2px solid #337ab7; outline-offset: 3px; }

html[data-theme="dark"] {
  color-scheme: dark;
  --tp-bg: #111827;
  --tp-surface: #1b2535;
  --tp-raised: #253247;
  --tp-hover: #30415b;
  --tp-border: #46566e;
  --tp-text: #e4eaf2;
  --tp-muted: #abb9cc;
  --tp-link: #91caff;
  --tp-primary: #275e99;
  --tp-success-bg: #193b30;
  --tp-success: #9be0b4;
  --tp-info-bg: #19364b;
  --tp-info: #a3d8f5;
  --tp-warning-bg: #46381e;
  --tp-warning: #f3d28b;
  --tp-danger-bg: #482731;
  --tp-danger: #ffb0b9;
  background: var(--tp-bg);
  color: var(--tp-text);
}

[data-theme="dark"] body { background: var(--tp-bg); color: var(--tp-text); }
[data-theme="dark"] a, [data-theme="dark"] .btn-link { color: var(--tp-link); }
[data-theme="dark"] a:hover, [data-theme="dark"] a:focus { color: #c5e3ff; }
[data-theme="dark"] .text-muted, [data-theme="dark"] .help-block,
[data-theme="dark"] caption,
[data-theme="dark"] h1 small, [data-theme="dark"] h2 small,
[data-theme="dark"] h3 small, [data-theme="dark"] h4 small,
[data-theme="dark"] footer { color: var(--tp-muted); }
[data-theme="dark"] hr, [data-theme="dark"] .page-header,
[data-theme="dark"] blockquote { border-color: var(--tp-border); }
[data-theme="dark"] legend { color: var(--tp-text); border-color: var(--tp-border); }
[data-theme="dark"] :focus-visible { outline-color: var(--tp-link); }

/* Navigation, tabs, and menus. */
[data-theme="dark"] .navbar-default { background: var(--tp-surface); border-color: var(--tp-border); }
[data-theme="dark"] .navbar-default .navbar-brand,
[data-theme="dark"] .navbar-default .navbar-nav > li > a { color: var(--tp-text); }
[data-theme="dark"] .navbar-default .navbar-nav > .active > a,
[data-theme="dark"] .navbar-default .navbar-nav > .open > a,
[data-theme="dark"] .navbar-default .navbar-nav > li > a:hover,
[data-theme="dark"] .navbar-default .navbar-nav > li > a:focus,
[data-theme="dark"] .navbar-default .navbar-toggle:hover,
[data-theme="dark"] .navbar-default .navbar-toggle:focus { background: var(--tp-raised); color: #fff; }
[data-theme="dark"] .navbar-default .navbar-toggle,
[data-theme="dark"] .navbar-default .navbar-collapse { border-color: var(--tp-border); }
[data-theme="dark"] .navbar-default .navbar-toggle .icon-bar { background: var(--tp-muted); }
[data-theme="dark"] .nav > li > a:hover,
[data-theme="dark"] .nav > li > a:focus,
[data-theme="dark"] .nav .open > a { background: var(--tp-raised); border-color: var(--tp-border); }
[data-theme="dark"] .nav-tabs { border-color: var(--tp-border); }
[data-theme="dark"] .nav > li.disabled > a,
[data-theme="dark"] .nav > li.disabled > a:hover,
[data-theme="dark"] .nav > li.disabled > a:focus { color: var(--tp-muted); background: transparent; }
[data-theme="dark"] .nav-tabs > li.active > a,
[data-theme="dark"] .nav-tabs > li.active > a:hover,
[data-theme="dark"] .nav-tabs > li.active > a:focus {
  background: var(--tp-surface); color: var(--tp-text); border-color: var(--tp-border); border-bottom-color: var(--tp-surface);
}
[data-theme="dark"] .nav-pills > li.active > a,
[data-theme="dark"] .nav-pills > li.active > a:hover,
[data-theme="dark"] .nav-pills > li.active > a:focus { color: #fff; background: var(--tp-primary); }
[data-theme="dark"] .dropdown-menu { background: var(--tp-surface); border-color: var(--tp-border); }
[data-theme="dark"] .dropdown-menu > li > a { color: var(--tp-text); }
[data-theme="dark"] .dropdown-menu > li > a:hover,
[data-theme="dark"] .dropdown-menu > li > a:focus { background: var(--tp-hover); color: #fff; }
[data-theme="dark"] .dropdown-menu > .active > a { background: var(--tp-primary); color: #fff; }
[data-theme="dark"] .dropdown-menu .divider { background: var(--tp-border); }
[data-theme="dark"] .dropdown-header,
[data-theme="dark"] .dropdown-menu > .disabled > a { color: var(--tp-muted); }

/* Surfaces and data tables, including dynamically rendered Vue components. */
[data-theme="dark"] .panel, [data-theme="dark"] .well,
[data-theme="dark"] .list-group-item, [data-theme="dark"] .modal-content,
[data-theme="dark"] .popover { background: var(--tp-surface); border-color: var(--tp-border); color: var(--tp-text); }
[data-theme="dark"] .panel-default > .panel-heading,
[data-theme="dark"] .panel-footer, [data-theme="dark"] .popover-title {
  background: var(--tp-raised); border-color: var(--tp-border); color: var(--tp-text);
}
[data-theme="dark"] .panel-heading, [data-theme="dark"] .panel-group .panel-heading + .panel-collapse > .panel-body,
[data-theme="dark"] .modal-header, [data-theme="dark"] .modal-footer { border-color: var(--tp-border); }
[data-theme="dark"] a.list-group-item:hover,
[data-theme="dark"] a.list-group-item:focus { background: var(--tp-hover); color: var(--tp-text); }
[data-theme="dark"] .list-group-item.active,
[data-theme="dark"] .list-group-item.active:hover,
[data-theme="dark"] .list-group-item.active:focus { background: var(--tp-primary); border-color: #548fc8; color: #fff; }
[data-theme="dark"] .table > thead > tr > th,
[data-theme="dark"] .table > tbody > tr > th,
[data-theme="dark"] .table > tbody > tr > td,
[data-theme="dark"] .table > tfoot > tr > td,
[data-theme="dark"] .table-bordered,
[data-theme="dark"] .table-bordered > thead > tr > td,
[data-theme="dark"] .lab-description td,
[data-theme="dark"] .lab-description th { border-color: var(--tp-border); }
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd),
[data-theme="dark"] .table > tbody > tr.ignore > td { background: var(--tp-raised); }
[data-theme="dark"] .table-hover > tbody > tr:hover,
[data-theme="dark"] .table > tbody > tr.active > td,
[data-theme="dark"] .table > tbody > tr > td.active { background: var(--tp-hover); }
[data-theme="dark"] .table .table { background: var(--tp-surface); }
[data-theme="dark"] .sep-column:not(:last-child) { border-right-color: var(--tp-border); }
[data-theme="dark"] .pagination > li > a,
[data-theme="dark"] .pagination > li > span,
[data-theme="dark"] .pager li > a, [data-theme="dark"] .pager li > span {
  background: var(--tp-surface); border-color: var(--tp-border); color: var(--tp-link);
}
[data-theme="dark"] .pagination > .active > a,
[data-theme="dark"] .pagination > .active > span { background: var(--tp-primary); color: #fff; }
[data-theme="dark"] .pagination > .disabled > a,
[data-theme="dark"] .pagination > .disabled > span,
[data-theme="dark"] .pager .disabled > a { background: var(--tp-bg); color: var(--tp-muted); }

/* Inputs, buttons, and board switches. */
[data-theme="dark"] .form-control,
[data-theme="dark"] .alertify .ajs-input {
  background: var(--tp-bg); color: var(--tp-text); border-color: #70839e;
}
[data-theme="dark"] .form-control::placeholder { color: var(--tp-muted); opacity: 1; }
[data-theme="dark"] .form-control:focus { border-color: var(--tp-link); box-shadow: 0 0 0 2px rgba(145,202,255,.2); }
[data-theme="dark"] .form-control[disabled],
[data-theme="dark"] .form-control[readonly],
[data-theme="dark"] fieldset[disabled] .form-control { background: var(--tp-raised); color: var(--tp-muted); }
[data-theme="dark"] .input-group-addon { background: var(--tp-raised); color: var(--tp-text); border-color: var(--tp-border); }
[data-theme="dark"] .btn-default {
  color: var(--tp-text); background: var(--tp-raised); border-color: var(--tp-border); text-shadow: none;
}
[data-theme="dark"] .btn-default:hover,
[data-theme="dark"] .btn-default:focus,
[data-theme="dark"] .btn-default.active,
[data-theme="dark"] .btn-default:active,
[data-theme="dark"] .open > .dropdown-toggle.btn-default { background: var(--tp-hover); color: #fff; border-color: #6983a5; }
[data-theme="dark"] .btn-default[disabled],
[data-theme="dark"] .btn-default.disabled { background: var(--tp-raised); border-color: var(--tp-border); }
[data-theme="dark"] .btn-primary { background: var(--tp-primary); border-color: #548fc8; color: #fff; }
[data-theme="dark"] .btn-primary:hover, [data-theme="dark"] .btn-primary:focus,
[data-theme="dark"] .btn-primary.active, [data-theme="dark"] .btn-primary:active { background: #3475b8; color: #fff; }
[data-theme="dark"] .btn-success { background: #276544; border-color: #479d6e; color: #fff; }
[data-theme="dark"] .btn-success:hover, [data-theme="dark"] .btn-success:focus { background: #307c53; color: #fff; }
[data-theme="dark"] .btn-info { background: #225c76; border-color: #4a9cbe; color: #fff; }
[data-theme="dark"] .btn-info:hover, [data-theme="dark"] .btn-info:focus { background: #2c7290; color: #fff; }
[data-theme="dark"] .btn-warning { background: #f3cd7d; border-color: #e1b85f; color: #352507; }
[data-theme="dark"] .btn-warning:hover, [data-theme="dark"] .btn-warning:focus { background: #ffe0a2; color: #352507; }
[data-theme="dark"] .btn-danger { background: #993d4d; border-color: #c86475; color: #fff; }
[data-theme="dark"] .btn-danger:hover, [data-theme="dark"] .btn-danger:focus { background: #b2485a; color: #fff; }
[data-theme="dark"] input[type="checkbox"], [data-theme="dark"] input[type="radio"] { accent-color: var(--tp-link); }
[data-theme="dark"] .bootstrap-switch { border-color: var(--tp-border); }
[data-theme="dark"] .bootstrap-switch .bootstrap-switch-label { background: var(--tp-surface); color: var(--tp-text); }
[data-theme="dark"] .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default,
[data-theme="dark"] .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default { background: var(--tp-raised); color: var(--tp-text); }

/* Semantic state colours retain their meaning in dark mode. */
[data-theme="dark"] .text-primary { color: var(--tp-link); }
[data-theme="dark"] .text-success { color: var(--tp-success); }
[data-theme="dark"] .text-info { color: var(--tp-info); }
[data-theme="dark"] .text-warning { color: var(--tp-warning); }
[data-theme="dark"] .text-danger { color: var(--tp-danger); }
[data-theme="dark"] .label-default, [data-theme="dark"] .badge { background: var(--tp-raised); color: var(--tp-text); }
[data-theme="dark"] .label-primary { background: var(--tp-primary); color: #fff; }
[data-theme="dark"] .label-success { background: #276544; color: #fff; }
[data-theme="dark"] .label-info { background: #225c76; color: #fff; }
[data-theme="dark"] .label-warning { background: #f3cd7d; color: #352507; }
[data-theme="dark"] .label-danger { background: #993d4d; color: #fff; }
[data-theme="dark"] .alert-success, [data-theme="dark"] .bg-success,
[data-theme="dark"] .panel-success > .panel-heading,
[data-theme="dark"] .table > tbody > tr.success > td,
[data-theme="dark"] .table > tbody > tr > td.success { background: var(--tp-success-bg); color: var(--tp-success); border-color: #3d7157; }
[data-theme="dark"] .alert-info, [data-theme="dark"] .bg-info,
[data-theme="dark"] .panel-info > .panel-heading,
[data-theme="dark"] .table > tbody > tr.info > td,
[data-theme="dark"] .table > tbody > tr > td.info { background: var(--tp-info-bg); color: var(--tp-info); border-color: #38637f; }
[data-theme="dark"] .alert-warning, [data-theme="dark"] .bg-warning,
[data-theme="dark"] .panel-warning > .panel-heading,
[data-theme="dark"] .table > tbody > tr.warning > td,
[data-theme="dark"] .table > tbody > tr > td.warning { background: var(--tp-warning-bg); color: var(--tp-warning); border-color: #806a3f; }
[data-theme="dark"] .alert-danger, [data-theme="dark"] .bg-danger,
[data-theme="dark"] .panel-danger > .panel-heading,
[data-theme="dark"] .table > tbody > tr.danger > td,
[data-theme="dark"] .table > tbody > tr > td.danger { background: var(--tp-danger-bg); color: var(--tp-danger); border-color: #864c5a; }
[data-theme="dark"] .alert .alert-link { color: inherit; text-decoration: underline; }
[data-theme="dark"] .close { color: var(--tp-text); text-shadow: none; opacity: .8; }
[data-theme="dark"] .close:hover, [data-theme="dark"] .close:focus { opacity: 1; }
[data-theme="dark"] .progress { background-color: var(--tp-raised); }
[data-theme="dark"] .progress-bar { background-color: var(--tp-primary); }

/* Code, CI output, dialogs, and preview placeholders. Keep hardware pixels intact. */
[data-theme="dark"] pre, [data-theme="dark"] .hljs { background: #111b2b; color: #dae4f2; border-color: var(--tp-border); }
[data-theme="dark"] code { background: var(--tp-raised); color: #ffc0d0; }
[data-theme="dark"] pre code { background: transparent; color: inherit; }
[data-theme="dark"] .hljs-comment, [data-theme="dark"] .hljs-quote { color: var(--tp-muted); }
[data-theme="dark"] .hljs-keyword, [data-theme="dark"] .hljs-selector-tag,
[data-theme="dark"] .hljs-subst { color: #c9b5ff; }
[data-theme="dark"] .hljs-number, [data-theme="dark"] .hljs-literal,
[data-theme="dark"] .hljs-variable, [data-theme="dark"] .hljs-template-variable,
[data-theme="dark"] .hljs-tag .hljs-attr { color: #8bdfd5; }
[data-theme="dark"] .hljs-string, [data-theme="dark"] .hljs-doctag { color: #a9df9d; }
[data-theme="dark"] .hljs-title, [data-theme="dark"] .hljs-section,
[data-theme="dark"] .hljs-selector-id { color: #ffb1bd; }
[data-theme="dark"] .hljs-type, [data-theme="dark"] .hljs-class .hljs-title { color: #f3d28b; }
[data-theme="dark"] .hljs-tag, [data-theme="dark"] .hljs-name,
[data-theme="dark"] .hljs-attribute { color: var(--tp-link); }
[data-theme="dark"] .hljs-symbol, [data-theme="dark"] .hljs-bullet,
[data-theme="dark"] .hljs-regexp, [data-theme="dark"] .hljs-link { color: #e9b3ef; }
[data-theme="dark"] .hljs-built_in, [data-theme="dark"] .hljs-builtin-name { color: #9bd1ff; }
[data-theme="dark"] .hljs-meta { color: var(--tp-muted); }
[data-theme="dark"] .hljs-selector-class, [data-theme="dark"] .hljs-template-tag { color: #ffb1bd; }
[data-theme="dark"] .hljs-selector-attr, [data-theme="dark"] .hljs-selector-pseudo { color: #e9b3ef; }
[data-theme="dark"] .hljs-code, [data-theme="dark"] .hljs-addition { color: #a9df9d; }
[data-theme="dark"] .hljs-deletion { color: #ffb1bd; }
[data-theme="dark"] .hljs-meta-string { color: #9bd1ff; }
[data-theme="dark"] .hljs-deletion { background: var(--tp-danger-bg); }
[data-theme="dark"] .hljs-addition { background: var(--tp-success-bg); }
[data-theme="dark"] .commit-icon svg { fill: var(--tp-muted); }
[data-theme="dark"] .alertify .ajs-dialog,
[data-theme="dark"] .alertify .ajs-header,
[data-theme="dark"] .alertify .ajs-footer { background: var(--tp-surface); color: var(--tp-text); border-color: var(--tp-border); }
[data-theme="dark"] .alertify .ajs-body { color: var(--tp-text); }
[data-theme="dark"] .alertify .ajs-footer .ajs-buttons .ajs-button { background: var(--tp-raised); color: var(--tp-text); border: 1px solid var(--tp-border); }
[data-theme="dark"] .alertify-notifier .ajs-message { background: var(--tp-raised); color: var(--tp-text); border-color: var(--tp-border); text-shadow: none; }
[data-theme="dark"] .alertify-notifier .ajs-success { background: var(--tp-success-bg); color: var(--tp-success); }
[data-theme="dark"] .alertify-notifier .ajs-error { background: var(--tp-danger-bg); color: var(--tp-danger); }
[data-theme="dark"] .alertify-notifier .ajs-warning { background: var(--tp-warning-bg); color: var(--tp-warning); }
[data-theme="dark"] .dvi-preview-container,
[data-theme="dark"] .dvi-preview-body h1,
[data-theme="dark"] #hint { color: var(--tp-muted); }
[data-theme="dark"] body > h1 { color: var(--tp-text); }
/* WaveDrom's SVG includes a fixed light palette. Preserve legible signal colours. */
[data-theme="dark"] #WaveDrom_Display_0 { background: #fff; border-radius: 4px; }
[data-theme="dark"] .dvi_output { background: var(--tp-surface); color: var(--tp-text); }

@media (max-width: 991px) {
  .board-stage { min-height: 0; aspect-ratio: 1.5; margin-bottom: 20px; }
}

/* Keep the complete admin navigation usable at tablet widths. */
@media (min-width: 768px) and (max-width: 1199px) {
  .navbar-header { float: none; }
  .navbar-toggle { display: block; }
  .navbar-collapse.collapse { display: none !important; }
  .navbar-collapse.collapse.in { display: block !important; }
  .navbar-nav, .navbar-nav > li { float: none; }
  .navbar-right { float: none !important; margin: 7.5px -15px; }
  .navbar-nav > li > a { padding-top: 10px; padding-bottom: 10px; }
  .theme-toggle { margin-left: 15px; }
}

@media (max-width: 767px) {
  .theme-toggle { margin-left: 15px; }
}
