/*
	tables and tabs (hu_table0 is without borders, hu_table1 with frame+columns (not rows), hu_table2 full)
	  0x = no headers,
	  1x = header,
	  2x = header and footer

	  x0 = outer border only
	  x1 = header bottom
          x2 = inner border
          x3 = outer border, header bottom, footer top
	  x4 = inner border columns, header bottom, footer top
          x5 = inner border rows
*/

.hu_trbk { background-color: #f4f4f4; }

/* table w/o borders */

.hu_table0 {
        margin-top: 1ex;
        margin-bottom: 1ex;
	border-collapse: collapse;
}

.hu_table0 th {
        border: none;
	padding: 4px 6px 5px 6px;
}

.hu_table0 th a { font-weight: bold; }

.hu_table0 th a.overlay, .hu_table0 th a.tooltip { font-weight: bold; }

.hu_table0 td {
	vertical-align: baseline;
        border: none;
	padding: 4px 6px 4px 6px;
}


/* table w/ frame border & column lines */

.hu_table1, .hu_table3 {
        margin-top: 1ex;
	margin-bottom: 1em;
	border: none;
	box-shadow: var(--wss-shadow);
}
.hu_table3 {
	width: -webkit-fill-available;
}

.hu_table1 th {
	font-weight: normal; /* bold */
	color: white;
	border: none;
	padding: 3px 5px 4px 5px;
}

.hu_table1 th a {
	font-weight: normal; /* bold */
	color: white;
}

.hu_table1 th a.overlay, .hu_table1 th a.tooltip { font-weight: bold; }
.hu_table1 td {
	border: none;
	padding: 0.4em 0.5em 0.4em 0.5em;
}

.hu_table1 td a { color: var(--link1); }
.hu_table1 td a.overlay, .hu_table1 td a.tooltip {}


.hu_table1 tr:first-child, .hu_table3 tr:first-child {
	border-radius: 5px 0 5px 0;
	background-color: var(--table-h-bg);
	position: sticky;
	top: 0;
	backdrop-filter: blur(20px);
	z-index: 5;
}

.hu_table1 tr:first-child:hover, .hu_table3 tr:first-child:hover {
	background-color: var(--table-h-hov-bg);
	box-shadow: none;
}

.hu_table1 tr:not(:first-child):not(.hu_trbk):hover, .hu_table3 tr:not(:first-child):not(.hu_trbk):hover {
	background-color: var(--secondary-5);
}

/* table w/ full borders */

.hu_table2 {
        margin-top: 1ex;
        margin-bottom: 1ex;
	border-collapse: collapse;
}

.hu_table2 th {
	border-width: 1px 1px 2px 1px;
	border-style: solid;
	border-color: #000000;
        padding: 3px 5px 4px 5px;
}

.hu_table2 th a { font-weight: bold; }
.hu_table2 th a.overlay, .hu_table2 th a.tooltip { font-weight: bold; }
.hu_table2 td {
	border: 1px solid #000000;
        padding: 3px 5px 4px 5px;
}

.hu_table2 td a { color: var(--link1); }
.hu_table2 td a.overlay, .hu_table2 td a.tooltip {}

/* table w/ frame border and header line */
.hu_table3 th {
	font-weight: normal; /* bold */
	color: white;
        padding: 3px 5px 4px 5px;
        width: -webkit-fill-available;
}
.hu_table3 th a { font-weight: normal; /* bold */ color: white; }
.hu_table3 th a.overlay, .hu_table3 th a.tooltip { font-weight: bold; }
.hu_table3 td { padding: 3px 5px 4px 5px; }
.hu_table3 td a { color: var(--link1); }
.hu_table3 td a.overlay, .hu_table2 td a.tooltip { }
.hu_trbk { background-color: var(--secondary-6); }
.hu_trbk:hover { background-color: var(--secondary-5); cursor: text; }

.hu_table00, .hu_table02, .hu_table03, .hu_table04,.hu_table05,
.hu_table10, .hu_table12, .hu_table13, .hu_table14,.hu_table15,
.hu_table20, .hu_table22, .hu_table23, .hu_table24,.hu_table25 {
        margin-top: 1ex;
        margin-bottom: 1ex;
        margin-left: 0ex !important;
	border-collapse: collapse;
        border: 0px solid #000000 !important;
}


.hu_table00, .hu_table03,
.hu_table10, .hu_table13, .hu_table20, .hu_table23 {
	border-width: 1px !important;
}

.hu_table10 tr:first-child, .hu_table11 tr:first-child, .hu_table12 tr:first-child, .hu_table13 tr:first-child, .hu_table14 tr:first-child, .hu_table15 tr:first-child,
.hu_table20 tr:first-child, .hu_table21 tr:first-child, .hu_table22 tr:first-child, .hu_table23 tr:first-child, .hu_table24 tr:first-child, .hu_table25 tr:first-child,
.hu_table20 tr:last-child, .hu_table21 tr:last-child, .hu_table22 tr:last-child, .hu_table23 tr:last-child, .hu_table24 tr:last-child, .hu_table25 tr:last-child { font-weight: bold; }

.hu_table11 tr:first-child, .hu_table21 tr:first-child, .hu_table23 tr:first-child  { border-bottom: 2px solid #000000; }
.hu_table21 tr:last-child, .hu_table23 tr:last-child  { border-top: 1px solid #000000; }
.hu_table02 td, .hu_table12 td, .hu_table22 td { border-right: 1px solid #000000; }
.hu_table02 td:last-child, .hu_table12 td:last-child, .hu_table22 td:last-child { border-right: 0px solid #000 !important; }
.hu_table02 tr, .hu_table12 tr, .hu_table22 tr { border-bottom: 1px solid #000000; }
.hu_table14 tr:first-child, .hu_table24 tr:first-child { border-bottom: 1px solid #000000; }
.hu_table24 tr:last-child { border-top: 1px solid #000000; }
.hu_table02 tr:last-child, .hu_table12 tr:last-child, .hu_table22 tr:last-child { border-bottom: 0px solid #000 !important; }
.hu_table04 td, .hu_table14 td, .hu_table24 td { border-right: 1px solid #000000; }
.hu_table04 td:last-child, .hu_table14 td:last-child, .hu_table24 td:last-child { border-right: 0px solid #000 !important; }
.hu_table05 tr, .hu_table15 tr, .hu_table25 tr { border-bottom: 1px solid #000000; }
.hu_table05 tr:last-child, .hu_table15 tr:last-child, .hu_table25 tr:last-child { border-bottom: 0px solid #000 !important; }

.hu_table11 tr td, .hu_table12 tr td, .hu_table14 tr td, .hu_table15 tr td { padding: 0.5em !important; }
.hu_table11 tr > td:first-child, .hu_table12 tr > td:first-child, .hu_table14 tr > td:first-child, .hu_table15 tr > td:first-child { padding-left: 0 !important;}
.hu_table11 tr > td:last-child, .hu_table12 tr > td:last-child, .hu_table14 tr > td:last-child, .hu_table15 tr > td:last-child { padding-right: 0 !important;}

/* tabs */
.hu_ltabs {
        border-bottom: 2px solid var(--tab2-b); /* prim1*/
        background: none !important;
	padding: 0;
	width: 100%;
	margin: 0 0 9px 0;
	float: left;
	clear: both;
}
.ltabs_sel {
	border-color: var(--tab2-sel-bg);
}

.hu_ltabs li {
	border-radius: 5px 5px 0 0;
	margin: 0 3px 0 0 !important;
}
.hu_ltabs li:hover { transition: all 0.2s ease-in; }
.hu_ltabs li a {
	color: var(--tab2); /* primary-2 */
	background: var(--tab2-bg) !important;
	border-radius: 5px 5px 0 0;
	border: none !important;
	padding: 6px 0 6px 7px !important;
}
.hu_ltabs li a:hover {
	background-color: var(--tab2-hov-bg) !important;
	transition: all 0.2s ease-in;
}
.hu_ltabs li a span { background: none !important; }
.hu_ltabs li.ltabs_sel a {
	color: var(--tab2-sel);
	background: var(--tab2-sel-bg) !important;
	/* padding: 6px 0 6px 7px !important; */
	border: none;
	border-radius: 5px 5px 0 0;
	z-index: 100;
}
.hu_ltabs li.ltabs_sel a span {
	color: var(--tab2-sel);
	font-weight: bold;
}

/* input elements */

/* input widgets */
.hu_itxt {
	border: none;
	border-bottom: 1px solid var(--gray-2);
        background-color: #ffffff;
	color: #000000;
	font-size: 100%;
	vertical-align: baseline;
}
.hu_idrd2  { /* will use system widget for dropdown */
	font-size: 100%;
}
.hu_idrd  { /* will use browser drawn widget for dropdown */
	background-color: #ffffff;
	border: none;
	border-bottom: 1px solid var(--gray-2);
	color: #000000;
	font-size: 100%;
}
.hu_ialt { vertical-align: text-bottom; }
.hu_ialt2 { background-color: #ffffff; vertical-align: text-bottom; }

/* background span */

.hu_ispan { /* input control background SPAN */
	text-align: left;
	white-space: nowrap;
	position: relative;
	top: -1px;
}

.hu_ispan_err { /* input control background SPAN on error */
	background-color: #cc0000;
	padding: 4px;
}

/* tool tips */
.hu_tooltip { /* underline, normal */
	border-bottom: 1px dashed #e69e61;
	font-weight: normal !important;
}
.hu_tooltip1 { /* no underline; default boldness */ }
.hu_tooltip2 { /* no underline, normal */ font-weight: normal !important; }
.hu_tooltip3 { /* underline; default boldness */ border-bottom: 1px dashed #e69e61; font-weight: bold !important; }
.hu_tooltip4 { /* underline, normal, black */ border-bottom: 1px dashed #e69e61; font-weight: normal !important; color: black; }
.hu_tooltip5 { /* no underline, default boldness, black */ color: black; }
.hu_tooltip6 { /* no underline, normal, black */ font-weight: normal !important; color: black; }
.hu_tooltip:HOVER, .hu_tooltip1:HOVER, .hu_tooltip2:HOVER, .hu_tooltip3:HOVER, .hu_tooltip4:HOVER, .hu_tooltip5:HOVER, .hu_tooltip6:HOVER  { text-decoration: none; }

body.htmlx a.hu_tooltip, body.htmlx a.hu_tooltip2, body.htmlx a.hu_tooltip3, body.htmlx a.hu_tooltip4, body.htmlx a.hu_tooltip5, body.htmlx a.hu_tooltip6 { font-weight: normal !important; }

.table-header-rotated { border-style: none !important; margin-right: 100px; }
.table-header-rotated th { border-style: none !important; background: none !important; }
/*
.table-header-rotated > tr th:nth-of-type(even) { background-color: #eeeeee !important; }
*/
.table-header-rotated th.row-header { width: auto; border-style: none !important; }
.table-header-rotated td {
  min-width: 40px;
  border-top: 1px solid #dddddd;
  border-left: 1px solid #dddddd;
  border-right: 1px solid #dddddd;
  border-bottom: 1px solid #dddddd;
  vertical-align: middle;
  text-align: center;
}
.table-header-rotated th.rotate-45 {
  height: 70px;
  min-width: 40px;
  position: relative;
  vertical-align: bottom;
  padding: 0;
  line-height: 0.99;
  transform:skew(-45deg,0deg);
  top: 0px;
  overflow: visible;
}
.deprectaed.table-header-rotated th.rotate-45 > div {
  position: relative;
  top: 0px;
  left: 60px; /* 80 * tan(45) / 2 = 40 where 80 is the height on the cell and 45 is the transform angle*/
  height: 100%;
  -ms-transform:skew(-45deg,0deg);
  -moz-transform:skew(-45deg,0deg);
  -webkit-transform:skew(-45deg,0deg);
  -o-transform:skew(-45deg,0deg);
  transform:skew(-45deg,0deg);
  overflow: hidden;
  border-left: 1px solid #dddddd;
  border-right: 1px solid #dddddd;
}
.table-header-rotated th.rotate-45 span {
  -ms-transform:skew(45deg,0deg) rotate(315deg);
  -moz-transform:skew(45deg,0deg) rotate(315deg);
  -webkit-transform:skew(45deg,0deg) rotate(315deg);
  -o-transform:skew(45deg,0deg) rotate(315deg);
  transform:skew(45deg,0deg) rotate(315deg);
  position: absolute;
  bottom: 22px;
  left: 5px;
  display: inline-block;
  width: 60px; /* narrow enough to wrap into 2-3 lines within the 70px high header */
  text-align: left;
  line-height: 0.99;
}
/*
 * Wide report tables (Data Export: ~120 columns, slanted column titles), all themes. Behaviour script: js/ui/wideTables.js.
 * Colours come from the --wt-* variables below (classic tokens); a theme sets its own in its stylesheet (trialive.css, dark-styles.css).
 *
 * - Cells wrap at --wt-cell-max: with a body of `width: max-content` every column grew to its longest text (a 600 character
 *   comment made a 2900px column and a 16800px table).
 * - Slanted titles (th.rotate-45 in table.table-header-rotated, see above): the cells are skewed by -45deg and the titles rotated
 *   inside a 70px row; one-line titles run out of it and the box cuts them. Keep the cells upright, rotate only the title from
 *   the bottom left corner of its cell, wrap it at 160px (three lines fit the 150px row). Sortable titles are `th > a > span`;
 *   the `th > span` rules above missed them and left them almost upright.
 * - The table is its own scroll box, at most one screen high: the horizontal scrollbar is visible at its lower edge once the
 *   table is on screen, the title row stays on top and the first column at the left. The scroll area includes the slanted titles,
 *   nothing is reserved at the right; the title of the last column hangs at the left edge of its cell and wideTables.js makes
 *   that column as wide as the title needs.
 */
:root {
  --wt-cell-max: 28rem;
  --wt-scrollbar-size: 18px;
  --wt-header-bg: var(--table-h-bg, #e9edf2);
  --wt-surface: #fff;
  --wt-row-alt: var(--secondary-6, #f4f4f4); /* .hu_trbk */
  --wt-row-under: transparent; /* tint under every body row, for themes that colour all rows */
  --wt-row-hover: var(--secondary-5, var(--wt-row-alt)); /* hover of .hu_trbk */
  --wt-row-hover-soft: var(--secondary-5, #dbe5f1); /* hover of the rows without .hu_trbk */
  --wt-bar-thumb: #6f7b88;
  --wt-bar-thumb-hover: #3d4650;
  --wt-bar-track: #e6e9ed;
  --wt-hint-bg: #222;
  --wt-hint-fg: #fff;
}

.c31tab14bot :is(.hu_table1, .hu_table2, .hu_table3) td {
  max-width: var(--wt-cell-max);
  overflow-wrap: break-word;
}

/* scroll box */
:is(.c31tab14bot, body.htmlx) table.table-header-rotated {
  display: block;
  width: max-content;
  max-width: 100%;
  min-height: 300px;
  max-height: calc(100vh - 215px);
  margin-right: 0; /* see .table-header-rotated above (100px) */
  padding-right: 0;
  overflow: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: auto;
  scrollbar-color: var(--wt-bar-thumb) var(--wt-bar-track);
}

:is(.c31tab14bot, body.htmlx) table.table-header-rotated > :is(thead, tbody) {
  display: block;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.c31tab14bot table.table-header-rotated::-webkit-scrollbar {
  width: var(--wt-scrollbar-size);
  height: var(--wt-scrollbar-size);
}

.c31tab14bot table.table-header-rotated::-webkit-scrollbar-track {
  background: var(--wt-bar-track);
}

.c31tab14bot table.table-header-rotated::-webkit-scrollbar-thumb {
  border: 3px solid var(--wt-bar-track);
  border-radius: 9px;
  background: var(--wt-bar-thumb);
}

.c31tab14bot table.table-header-rotated::-webkit-scrollbar-thumb:hover {
  background: var(--wt-bar-thumb-hover);
}

/* slanted titles */
:is(.c31tab14bot, body.htmlx) table.table-header-rotated tr:has(> th) > th.rotate-45 {
  height: 150px;
  transform: none;
  /* a coloured cell would paint over the slanted title of its left neighbour; wideTables.js (.wt-hdr) switches to solid cells */
  background: transparent !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.table-header-rotated tr:has(> th.rotate-45) {
  background: var(--wt-header-bg);
}

.table-header-rotated th.rotate-45 > span,
.table-header-rotated th.rotate-45 > a > span {
  bottom: 12px;
  left: 50%;
  width: max-content;
  max-width: 160px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
  white-space: normal;
  line-height: 1.15;
}

.table-header-rotated tr:has(> th.rotate-45) > th.rotate-45:last-child > span,
.table-header-rotated tr:has(> th.rotate-45) > th.rotate-45:last-child > a > span {
  left: 6px;
}

/*
 * Title row: every title cell is sticky itself (a sticky <tr> inside the block level table body is not painted by Firefox once
 * the table is scrolled) and has the same solid --wt-header-bg. The slanted titles reach into the cells to their right, so
 * wideTables.js gives the cells a falling z-index (left cell on top) and sets .wt-hdr; the row is its own stacking context so that
 * the sticky first column of the rows is not painted over the first title cell (Firefox).
 */
.c31tab14bot table.table-header-rotated tr:has(> th) {
  position: relative;
  z-index: 100;
}

.c31tab14bot table.table-header-rotated.wt-hdr tr:has(> th) > th,
.c31tab14bot table.table-header-rotated.wt-hdr tr:has(> th) > th.rotate-45 {
  position: sticky;
  top: 0;
  /* some classic themes have a translucent header colour: lay it over the surface so that nothing shows through */
  background: linear-gradient(var(--wt-header-bg), var(--wt-header-bg)), var(--wt-surface) !important;
}

.c31tab14bot table.table-header-rotated.wt-hdr tr:has(> th) > th:first-child {
  left: 0;
  box-shadow: none;
}

/* first column: sticky, so it must hide what scrolls under it; the row colour is rebuilt opaque (the hover colour of some rows is translucent) */
.c31tab14bot table.table-header-rotated tr:not(:has(> th)) > :first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  background-color: var(--wt-surface);
  box-shadow: inset 0 0 0 100vmax var(--wt-row-under);
}

.c31tab14bot table.table-header-rotated tr.hu_trbk:not(:has(> th)) > :first-child {
  box-shadow: inset 0 0 0 100vmax var(--wt-row-alt);
}

.c31tab14bot table.table-header-rotated tr.hu_trbk:not(:has(> th)):hover > :first-child {
  box-shadow: inset 0 0 0 100vmax var(--wt-row-hover);
}

.c31tab14bot table.table-header-rotated tr:not(.hu_trbk):not(:has(> th)):hover > :first-child {
  box-shadow: inset 0 0 0 100vmax var(--wt-row-hover-soft), inset 0 0 0 100vmax var(--wt-row-under);
}

/* hint of wideTables.js */
.wt-scroll-hint {
  position: fixed;
  z-index: 2000;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--wt-hint-fg);
  background: var(--wt-hint-bg);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.25);
  font-size: 13px;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.wt-scroll-hint-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.wt-scroll-hint-key {
  display: inline-block;
  margin-right: 2px;
  padding: 1px 7px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-weight: 700;
}
