/* Main Stuff */

body {
  background-color: black;
  color: #ddd;
  font-family: Arial;
  line-height: 1.25;
  padding: 50px 50px 50px 250px;
  font-size: 13.5px
}

hr { margin-bottom: 35px; margin-top: 35px }
h1 { font-size: 32px }
h2 { margin-bottom: 20px }

img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

a:link {
  color: yellow;
  background-color: transparent;
  text-decoration: none;
}

a:visited {
  color: yellow;
  background-color: transparent;
  text-decoration: none;
}

.footnote { 
  color: gray; 
  font-size: 9;
  font-style: oblique;
  margin-bottom: 13.5px;
}

.structure {
 font-weight: 700;
 text-align: center;
}

/* Titles */

.pairs {
  display: grid;
  grid-template-columns: 100px 1fr;
  column-gap: 1ch;
  margin: 0;
}

.pairs dt, .pairs dd { margin: 0 }

.title { font-size: 32px; font-weight: 700 }
.head1 { font-size: 24px; font-weight: 700 }
.head2 { font-size: 18px; font-weight: 700 }

/* Glossing */

.sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.sentence dl { margin: 0 }

.gloss-pair, .gloss-grid {
  margin-bottom: -13.5px;
  display: grid;
  column-gap: 10px;
  row-gap: 0;
  align-items: flex-start;
}

.gloss-pair { grid-template-columns: repeat(2, minmax(0, 1fr)) }

.gloss-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) }

dl.gloss { margin-top: 0; margin-left: 20px }
dl.gloss dt { font-weight: 700; font-size: 15px }
dl.gloss dd { margin-left: 0; font-size: 9px; margin-bottom: 0.3em }

.translation { font-style: oblique }
.translation.sentence { margin-left: 20px; margin-bottom: 13.5px }

.elucidation {
  flex: 0 0 100%;
  font-style: normal;
  font-size: 11px;
  color: gray;
}

/* D-Cedilla */

.dced{
  position: relative;
  display: inline-block;
  line-height: 1;
}

.dced::after {
  content: "¸";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0em;
  font-size: 13.5px;
}


/* Tables */

table, th, td {
  margin: auto;
  margin-top: 1em;
  margin-bottom: 1em;
  font-size: 13.5px;
  text-align: left;
  border: 1px solid white;
  border-collapse: collapse;
  table-layout: fixed;
  padding: 5px 5px 5px 5px;
  overflow-wrap: break-word;
}

table { width: 97.5% }
th { background-color: #333; font-weight: 700; width: 140px }
thead td { text-align: center; border-bottom-width: 2.5px }

table.center, table.center th, table.center td { table-layout: auto; text-align: center }

table.slots th { text-align: center }
table.slots th:first-child, table.slots td:first-child { background-color: #666 }
table.slots th:nth-child(2), table.slots td:nth-child(2) { font-weight: normal }

table.affix thead th { background-color: #666 }
table.affix td:first-child, table.affix th:first-child { width: 15px; text-align: center }

table.row-lines { border-collapse: collapse; border-spacing: 0; border: none }
table.row-lines td, table.row-lines th { border: none }
table.row-lines tr:not(:last-child) > td, table.row-lines tr:not(:last-child) > th { border-bottom: 1px solid #ccc }

table.list, table.list th, table.list td { 
  table-layout: auto;
  width: fit-content; 
  vertical-align: top;
  border: none;
  margin-left: 2em;
  padding: 0;
  line-height: 1.25;
}

table.list td { font-weight: 300; background-color: black; padding-right: 1em }
.list.two-space td { padding-top: 0.4em; padding-bottom: 0.4em }
table.list td.subitem { padding-left: 2em }

table.abbrev, table.abbrev th, table.abbrev td {
  line-height: 1.1;
  table-layout: fixed;
  text-align: left;
  vertical-align: top;
  border: none;
  padding: 0px 0px 0px 0px
}

table.abbrev { width: 60% }
table.abbrev td { width: 33.33% }

table.pchart { table-layout: auto; border: 0 }
table.pchart, table.pchart th, table.pchart td { text-align: center }

table.pchart tr > :nth-child(3n+1) { width: 12.4% }
table.pchart tr > :nth-child(3n+2) { width: 12.4% }
table.pchart tr > :nth-child(3n) { border: 0 }

table.ext-chart { 
  table-layout: auto; 
  border: 0;
  --cell: 15.5%;
  --gap: 1%;
  --border: 1px solid white;
}

table.ext-chart, table.ext-chart th, table.ext-chart td { text-align: center }

table.ext-chart tr > :nth-child(odd){ width: 15.5% }
table.ext-chart tr > :nth-child(even){ border: 0 }

table.ext-chart tr > :nth-child(2) {  }
table.ext-chart tr > :nth-child(3) {  }


table.ilc-chart, table.ilc-chart th, table.ilc-chart td { text-align: center }

/* Sidebar */

.sidenav {
  height: 100%;
  width: 200px;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  white-space: nowrap;
  background-color: #151515;
  overflow-x: hidden;
  padding-top: 20px;
  padding-left: 7.5px;
}

.sidenav a {
  padding: 6px 10px 6px 16px;
  text-decoration: none;
  font-size: 10px;
  color: #666;
  display: block;
  font-weight: bold;
}

.sidenav a:hover { color: LightGray }

.open-sidenav {
  display: none;
  top: 0;
  left: 0;
  position: fixed;
  z-index: 2;
  justify-content: center;
  align-items: center;
  height: 50px;
  width: 100%;
  background-color: #222;
}

/* svg data */

.diagram {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.flow{
  min-width: 655px;
  display: block;
  margin: 0 auto;
}

.cluster { fill: #333; z-index: 1; }
.box { fill: black; z-index: 2; stroke: #ddd; stroke-width: 2 }
.label { fill: #ddd; z-index: 3; font-weight: 700 }

.arrow { 
  stroke: #ddd;
  z-index: 2;
  stroke-width: 2;
  fill: none;
  marker-end: url(#arrow);
}

/* MOBILE BEHAVIOR */

@media (max-width: 560px) {
  
  body { 
    padding: 75px 5px 5px 5px;
  }
  
  .pairs { grid-template-columns: 70px 1fr }
  th { width: 100px }
  table.list, table.list td { margin-left: 0.5em }
  dl.gloss { margin-left: 10px; margin-right: 10px }
  .translation.sentence { margin-left: 10px; margin-bottom: 13.5px }
  .gloss-grid { column-gap: 0px }
  table.abbrev { width: 97.5% }
  table.abbrev td { font-size: 9px }
  
  .sidenav { 
    display: none;
    width: 100%;
    padding-top: 60px;
    padding-left: 7.5px;
  }
  
  .sidenav a {
    padding: 6px 6px 6px 16px;
    text-decoration: none;
    font-size: 20px;
    line-height: 1.85;
  }
  
  .sidenav.open { display: block }
  .open-sidenav { display: flex }

}