body {
    font-family: 'Open Sans', sans-serif;
    background-color: lightyellow;
    font-size: 12px;
    margin-left: 2px;
    margin-right: 2px;
    overflow-x: hidden;
    overflow-y: auto;
}

table {
    font-size: 12px;
    width: 100%;
}

div.battlescribe {
    display: flex;
    margin-bottom: 3rem;
}
div.battlescribe>h1 {
    display: none;
    flex: 0 0 auto;
    width: calc(100vw - 4px);
}

div.battlescribe>ul {
    flex: 1 0 auto;
}

.summary {
    flex: 0 0 auto;
    width: calc(100vw - 4px);
}

div.battlescribe>p:last-child {
    display: none;
}

.bold {
    font-weight: bold;
}


ul {
    list-style:  none;
    padding-left: 0;
    display: block;
       
}

li {
    display: block;
}

br {
    display: none;
}

h3 {
    display: none;
}

td, th {
    padding: 4px;
    text-align: center;
    vertical-align: top;
}



td:nth-child(11), th:nth-child(11) {
    text-align: left;
}

td:first-child, th:first-child {
    text-align: left;
}
.category > ul >.rootselection {
    flex: 0 0 auto;
    width: calc(100vw - 4px);
    box-sizing: border-box;
    scroll-snap-align: start;

    --x-display: --x-grid;
    padding: 4px;

    --x-grid-template-columns: 100%;
    --x-grid-template-rows: [title-start] auto 
                        [stats-start] auto 
                        [selections-start] auto 
                        [woundtrack-start] auto 
                        [weapons-start] auto 
                        [rules-start] auto 
                        [abilities-start] auto 
                        [abilities2-start] auto 
                        [keywords-start] auto [end];
}

.rootselection>h4 {
    margin: 0;
    border-bottom: 2px solid black;
    text-transform: uppercase;
    font-size: 1.5rem;
    --x-grid-row: title-start / span 1;
    margin-bottom: 4px;
}

.rootselection>ul>li {
    background-color: white;
    padding: 4px;
    margin-top: 4px;
}

.rootselection>ul h4 {
    border-bottom: 1px solid black;
    text-transform: uppercase;
    margin: 0;
}

.rootselection table:nth-of-type(2) {
    --x-grid-row: stats-start / span 1;
    background-color: white;
    border-spacing: 0;
}

.rootselection table:nth-of-type(3) {
    --x-grid-row: weapons-start / span 1;
    background-color: white;
    border-spacing: 0;
}

.rootselection table:nth-of-type(4) {
    --x-grid-row: woundtrack-start / span 1;
    background-color: white;
    border-spacing: 0;
    margin-bottom: 8px;
}

.rootselection table:nth-of-type(3) td,
.rootselection table:nth-of-type(3) th {
    padding: 4px 8px;
}


.rootselection table:nth-of-type(2) tr:nth-child(odd),
.rootselection table:nth-of-type(3) tr:nth-child(odd),
.rootselection table:nth-of-type(4) tr:nth-child(odd) {
    background-color: snow;
}

.rootselection table:nth-of-type(2) tr:first-child,
.rootselection table:nth-of-type(3) tr:first-child,
.rootselection table:nth-of-type(4) tr:first-child {
    background-color: lightsteelblue;
}


.rootselection table:nth-of-type(3) th:nth-child(n+7),
.rootselection table:nth-of-type(3) td:nth-child(n+7)
{
    text-align: left;
}

.rootselection table:nth-of-type(3) td:nth-child(3),
.rootselection table:nth-of-type(3) td:nth-child(8) {
    white-space: nowrap;
}

.rootselection>h4+p {
    --x-grid-row: selections-start / span 1;
}

td.profile-name:first-child:nth-last-child(3),
td.profile-name:first-child:nth-last-child(3) ~ td {
    text-align: left;
    white-space: normal !important;
}


.rule-names {
    --x-grid-row: rules-start / span 1;
    background-color: white;
    padding: 4px;
}

.profile-names {
    --x-grid-row: abilities-start / span 1;
    background-color: white;
    padding: 4px;
    margin-top: 0;
    margin-bottom: 0;

}

.profile-names:before {
    display: block;
    content: "ABILITIES";
    font-weight: bold;
    border-bottom: 1px solid black;
    background-color: lightsteelblue;
    padding: 4px;
    margin: -4px -4px 4px -4px;
}

.profile-names+br+table {
    --x-grid-row: abilities2-start / span 1;
    background-color: white;
}

.rootselection table:first-of-type td,
.rootselection table:first-of-type th {
    text-align: left;
}

.category-names {
    --x-grid-row: keywords-start / span 1;
    background-color: white;
    padding: 4px;
}

.battlescribe>ul {
    display: flex;
}
li.force {
    flex: 1 0 auto;
}

.force > ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
 }

.force > h2 {
    display: none;
}

.force>ul>li {

    flex: 1 0 auto;
 }

.category>ul {
    display: flex;
    scroll-snap-type: x mandatory
}

.category>ul>li {
    flex: 1 0 auto;
    width: calc(100vw - 4px);
}

nav {
    box-sizing: border-box;
    padding: 4px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: whitesmoke;
    display: flex;
    flex-wrap: wrap;
    
    align-content: flex-start;
    justify-content: flex-start;
    z-index: 10;
}

.navButton {
    z-index: 9;
    position: fixed;
    bottom: 0;
    right: 0;
    transform: translate(50%, 50%);
    border-radius: 40%;
    width: 100px;
    height: 100px;
    background-color: violet;
}

nav.hidden {
    display: none;
}

nav.hidden a {
    display: none;
}

nav a {
    box-sizing: border-box;
    flex: 0 0 auto;
    display: block;
    font-size: 1.1rem;
    width: 50%;
    padding: 4px;
    
}


.rootselection:not(.focus), .summary:not(.focus) {
    display: none !important;
}