/*
** Tabsets shrink the widths of their children until they all fit on one line.
** This implementation automatically supports up to 12 tabs within one tabset.
**
** Specify the number of tabs per line with the "tabset-##" classes.
** (If you have 6 items, use tabset-3 to force 2 lines of 3 tabs.)
** (If you have 3 items, use tabset-4 to force extra space around each tab.)
**
** Set a min-width to determine the breakpoint at which tabsets start applying.
**
** TODO: Account for tabs with irregular widths.
*/
@media (min-width: 40rem) {
  /* 1rem ≈ 16px */
  
  .tabset.tabset {
    clear: both;
    /* overflow: hidden; */
    position: relative;
  }
  
  .tabset.tabset * {
    box-sizing: border-box !important;
  }
  
  .tabset.tabset > * {
    display: inline-block;
    margin: 0 auto;
    /* overflow: hidden; */
    position: relative;
  }
  
  .tabset-1.tabset-1 > *,
  .tabset > *:first-of-type:nth-last-child(1),
  .tabset > *:first-of-type:nth-last-child(1) ~ * {
    width: calc((100% / 1) - 1px) !important;
  }
  
  .tabset-2.tabset-2 > *,
  .tabset > *:first-of-type:nth-last-child(2),
  .tabset > *:first-of-type:nth-last-child(2) ~ * {
    width: calc((100% / 2) - 1px) !important;
  }
  
  .tabset-3.tabset-3 > *,
  .tabset > *:first-of-type:nth-last-child(3),
  .tabset > *:first-of-type:nth-last-child(3) ~ * {
    width: calc((100% / 3) - 1px) !important;
  }
  
  .tabset-4.tabset-4 > *,
  .tabset > *:first-of-type:nth-last-child(4),
  .tabset > *:first-of-type:nth-last-child(4) ~ * {
    width: calc((100% / 4) - 1px) !important;
  }
  
  .tabset-5.tabset-5 > *,
  .tabset > *:first-of-type:nth-last-child(5),
  .tabset > *:first-of-type:nth-last-child(5) ~ * {
    width: calc((100% / 5) - 1px) !important;
  }
  
  .tabset-6.tabset-6 > *,
  .tabset > *:first-of-type:nth-last-child(6),
  .tabset > *:first-of-type:nth-last-child(6) ~ * {
    width: calc((100% / 6) - 1px) !important;
  }
  
  .tabset-7.tabset-7 > *,
  .tabset > *:first-of-type:nth-last-child(7),
  .tabset > *:first-of-type:nth-last-child(7) ~ * {
    width: calc((100% / 7) - 1px) !important;
  }
  
  .tabset-8.tabset-8 > *,
  .tabset > *:first-of-type:nth-last-child(8),
  .tabset > *:first-of-type:nth-last-child(8) ~ * {
    width: calc((100% / 8) - 1px) !important;
  }
  
  .tabset-9.tabset-9 > *,
  .tabset > *:first-of-type:nth-last-child(9),
  .tabset > *:first-of-type:nth-last-child(9) ~ * {
    width: calc((100% / 9) - 1px) !important;
  }
  
  .tabset-10.tabset-10 > *,
  .tabset > *:first-of-type:nth-last-child(10),
  .tabset > *:first-of-type:nth-last-child(10) ~ * {
    width: calc((100% / 10) - 1px) !important;
  }
  
  .tabset-11.tabset-11 > *,
  .tabset > *:first-of-type:nth-last-child(11),
  .tabset > *:first-of-type:nth-last-child(11) ~ * {
    width: calc((100% / 11) - 1px) !important;
  }
  
  .tabset-12.tabset-12 > *,
  .tabset > *:first-of-type:nth-last-child(12),
  .tabset > *:first-of-type:nth-last-child(12) ~ * {
    width: calc((100% / 12) - 1px) !important;
  }
  
}