* {
    font-family: sans-serif;
}
:root {
    --grid: 1px;
    --radius: 20px;
    --square: calc(1.4em - var(--grid));
}
a {
    text-decoration: none;
}
table {
    margin: 0 auto;
    border-spacing: 0px;
    border-collapse: collapse;
}
thead:first-of-type th {
    text-align: right;
    vertical-align: bottom;
}
thead:not(:first-of-type) {
    position: sticky;
    z-index: 1;
    background-color: #fffc;
    font-size: 0.8em;
}
thead:nth-of-type(2) {
    top: 0px;
}
thead:last-of-type {
    bottom: 0px;
}
thead th {
    cursor: not-allowed;
}
thead:not(:first-of-type) th:not(.uiaas) {
    cursor: ns-resize;
}
thead:not(:first-of-type) th:not(.uiaas)::after {
    position: relative;
    top: -5px;
    color: gray;
}
thead:not(:first-of-type) th[aria-sort]::after {
    color: crimson;
}
thead:not(:first-of-type) th:not([aria-sort], .uiaas)::after {
    content: "▿";
}
thead:not(:first-of-type) th[aria-sort]:not(.uiaas)::after {
    content: "▾";
}
thead:not(:first-of-type) th:not([aria-sort]):is(th:nth-of-type(1), th:nth-of-type(3))::after {
    content: "▵";
}
thead:not(:first-of-type) th[aria-sort]:is(th:nth-of-type(1), th:nth-of-type(3))::after {
    content: "▴";
}
thead:not(:first-of-type) th.uiaas {
    padding: 0px;
}
thead:not(:first-of-type) th.uiaas span {
    display: inline-block;
    width: calc(var(--square) - 1px);
    border-left: var(--grid) solid #fff0;
    border-right: var(--grid) solid #fff0;
    font-size: 1.125em;
}
thead:nth-of-type(2) th,
thead:nth-of-type(2) th.uiaas span {
    vertical-align: bottom;
}
thead:nth-of-type(2) th.uiaas span {
    padding-bottom: 3px;
    writing-mode: sideways-lr;
}
thead:last-of-type th,
thead:last-of-type th.uiaas span {
    vertical-align: top;
}
thead:last-of-type th.uiaas span {
    padding-top: 3px;
    writing-mode: sideways-rl;
}
tbody td {
    padding: 0px 3px;
}
tbody td:not(.uiaas, td:last-of-type) {
    font-size: 0.8em;
}
thead:first-of-type td.uiaas,
tbody :is(td.uiaas, td:last-of-type) {
    padding: 0px;
    font-size: 0.9em;
}
thead:first-of-type td.uiaas {
    height: 100px;
}
thead:first-of-type td.uiaas span {
    text-align: start;
    text-indent: 200px;
}
thead:first-of-type td.uiaas:hover span {
    text-indent: 3px;
}
thead:first-of-type td.uiaas span.sum {
    width: calc(var(--square) - var(--grid));
    border-right: var(--grid) solid #0001;
    border-bottom: var(--grid) solid #0002;
/*
    border-top-left-radius: 33px 99px;
    border-top-right-radius: 44px 22px;
    border-bottom-left-radius: 44px 22px;
    border-bottom-right-radius: 33px 99px;
*/
}
tbody td.uiaas span {
    text-align: center;
}
thead:first-of-type td.uiaas span,
tbody td.uiaas span {
    display: inline-block;
    vertical-align: bottom;
    writing-mode: sideways-lr;
    padding-top: 0px;
    padding-bottom: 0px;
    width: var(--square);
    height: var(--square);
    border-left: var(--grid) solid #fff2;
    border-top: var(--grid) solid #fff2;
}
tbody td.uiaas span.sum {
    content-visibility: hidden;
/*
    width: calc(var(--square) - var(--grid));
    height: calc(var(--square) - var(--grid) - 0px);
    border-right: var(--grid) solid #0001;
    border-bottom: var(--grid) solid #0001;
/*
    border-top-left-radius: 33px 11px;
    border-top-right-radius: 11px 22px;
    border-bottom-left-radius: 11px 22px;
    border-bottom-right-radius: 22px 11px;
*/
}
thead:not(:first-of-type) th.uiaas span.hover,
tbody td.uiaas span.hover:not(.sum) {
    background-color: #dbf1;
    width: calc(var(--square) - 1px);
    border-left: 1px solid #dbf4;
    border-right: 1px solid #dbf4;
}
tbody tr:hover {
    background-color: #fd74;
}
tbody tr:hover td.uiaas span:not(.sum) {
    height: calc(var(--square) - 1px);
    border-top: 1px solid #fd78;
    border-bottom: 1px solid #fd78;
}
tbody td:last-of-type {
    width: 100px;
    padding: 0px;
}
tbody td:last-of-type span {
    display: inline-block;
    color: #fff0;
    height: var(--square);
    text-indent: 3px;
    border-left: var(--grid) solid #fff2;
    border-top: var(--grid) solid #fff2;
    border-right: var(--grid) solid #0001;
}