/*! HTML5 Boilerplate v7.3.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

.browserupgrade {
  margin: 0.2em 0;
  background: #ccc;
  color: #000;
  padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

body {
  margin: 1em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

/* drag-and-drop */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  border: solid 2px black;
  border-radius: 0.25em;
  padding: 0.5em;
  display: inline-block;
}

.card a {
  /* make it big, make it under */
}

h3 {
  margin-top: 0;
}

code {
  color: #000080;
  background-color: #f8f8f8;
  padding: 0.15em;
}

.attr-key {
  color: #008080;
}

.attr-value {
  color: #d14;
}

kbd {
  background-color: #f8f8f8;
  border: solid 1px #666;
  border-radius: 2px;
  padding: 0.075em;
}

[role="menu"] {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  background: white;
  padding: 0.5em;
  border: solid 1px #000;
}

[role="menu"] {
  padding: 0.25em;
}

[role="separator"] {
  border-top: solid 1px #666;
}

/* cards and hover and focus */

.demo-cards {
  display: flex;
  flex-wrap: wrap;
}

.demo-card {
  margin: 2em;
  border: solid 2px #333;
  border-radius: 1em;
  padding: 2em;
  flex: 0 1 20em;
}

.demo-card:focus-within,
.demo-card:hover {
  box-shadow: 0 0 0 0.25rem;
}

.demo-card a {
  color: hotpink;
  text-decoration: none;
}

.demo-card a:hover,
.demo-card a:focus {
  text-decoration: underline;
  color: #915;
  outline: none;
}

.demo-card button {
  background-color: hotpink;
  color: #fff;
  border: none;
  padding: 0.5em 1em;
  border-radius: 0.25em;
  box-shadow: rgba(0, 0, 0, 0.5) 0.15em 0.15em 0;
}

.demo-card button + button {
  margin-left: 1em;
}

.demo-card button:hover,
.demo-card button:focus {
  background-color: #c48;
  cursor: pointer;
  outline: none;
  box-shadow: rgba(0, 0, 0, 0.5) 0 0 0 0.2em;
}

.demo-card-stretch {
  position: relative;
}

.demo-card-stretch a:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* btn-state-demo */

.btn-state-demo-list li,
.link-state-demo-list li {
  margin-bottom: 2em;
}

.btn-state-demo-btn {
  background-color: white;
  color: green;
  border: solid 0.15em green;
  border-radius: 0.25em;
  padding: 0.25em 0.5em;
}

.btn-state-demo-btn-border:focus {
  border-color: black;
  background-color: green;
  color: white;
  outline: none;
}

.btn-state-demo-btn-focus:focus {
  outline: dotted 3px darkolivegreen;
  outline-offset: 1px;
}

.btn-state-demo-btn-shadow:focus {
  box-shadow: 0 0.25em 0.25em 0 rgba(0, 0, 0, 0.5);
  outline: none;
}

.btn-state-demo-btn-shadline:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.5);
  outline: none;
}

.btn-state-demo-btn-combo:focus {
  background-color: green;
  color: white;
  box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.5);
  outline: none;
}

.btn-state-demo-btn:active {
  color: red;
}

.link-state-demo {
  color: green;
  text-decoration: none;
}

.link-state-demo:hover,
.link-state-demo-focus-and-hover:focus {
  color: black;
  text-decoration: underline;
}

.link-state-demo-focus:focus {
  outline: dotted 3px darkolivegreen;
  outline-offset: 1px;
}

.link-state-demo:active {
  color: red;
}

.dc-demo main,
.dc-demo aside,
.dc-demo nav,
.dc-demo uk {
  display: contents;
}

.wca22focus .focus-outline:focus {
  outline: solid 1px blue;
}

.wca22focus .focus-box-shadow:focus {
  outline: none;
  box-shadow: 0 0 0 1px blue;
}

.wca22focus .focus-box-shadow-offset:focus {
  outline: none;
  box-shadow: 1px 1px 0 1px blue;
}

.wca22focus .focus-box-shadow-offset-more:focus {
  outline: none;
  box-shadow: 2px 2px 0 1px blue;
}

.wca22focus .focus-box-shadow-glow:focus {
  outline: none;
  box-shadow: 0 0 2px 1px blue;
}

.wca22focus .focus-box-shadow-soft-glow:focus {
  outline: none;
  box-shadow: 0 0 2px 1px rgba(0, 0, 255, 0.5);
}

.wca22focus .focus-background {
  background-color: lightgrey;
  padding: 0.1rem 0.25rem;
  border: solid 1px black;
}

.wca22focus .focus-background:focus {
  outline: none;
  background-color: blue;
}

.wca22focus .underline:focus {
  outline: none;
  text-decoration: none;
  color: blue !important;
}

.form-example {
  margin: 2rem 0;
}

.help-text {
  font-size: 0.9em;
}

[aria-invalid="true"] {
  border: solid 2px firebrick;
}

.error-text {
  color: firebrick;
  font-size: 0.9em;
}

.codeish {
  font-family: monospace, monospace;
  font-size: 1em;
}

blockquote {
  padding: 1rem;
  margin-left: 0;
  border-left: solid 2px gray;
}

.sounds-like {
  font-family: "Courier New", Courier, monospace;
  background-color: #333;
  color: #fff;
  border-radius: 0.25em;
  padding: 0.5em 1em;
  margin: 1em 0;
}

.skinny {
  max-width: 60em;
  margin: 0 auto;
}

/* for data vis */
.dv button, .dv img {
  display: block;
}

.dv button:focus,
.dv2 button:focus {
  outline: 2px solid hotpink;
  outline-offset: 2px;
}

.dv button, .dv img, .dv table,
.dv2 table {
    clear: both;
    margin-top: 2rem;
}

.dv .hide, .dv2 .hide {
  display: none;
}

[role="switch"] {
  padding: 0;
  background-color: #ccc;
  border-radius: 0.5rem;
}

[role="switch"] span {
  display: inline-block;
  padding: 0.5rem;
}

[role="switch"] :first-child {
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
}

[role="switch"] :last-child {
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

[role="switch"][aria-checked="true"] :first-child, 
[role="switch"][aria-checked="false"] :last-child {
  background: #1f77b4 ;
  color: #fff;
}

/*https://inclusive-components.design/toggle-button/*/

table {
  margin-bottom: 1em;
}

caption {
  margin-bottom: 1em;
  font-weight:  bold;
}

td {
  border-top: 1px solid #000;
}

td,
th {
  padding: 0.5em;
  line-height: 1;
}

th {
  text-align: left;
}

.numeric-data {
  text-align: right;
}


.show-ths th {
  outline: solid 2px red;
}

.show-ths th[colspan] {
  outline: solid 2px green;
}

.show-ths th[rowspan] {
  outline: solid 2px blue;
}

.show-ths table {
  outline: solid 2px #999;
}

.hidden-colspan-crouching-dragon {
/*  .sr-only */
/*but this collapses layout*/
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.double-up-colspan {
  
}

h1:target:before, h2:target:before, h3:target:before, h4:target:before {
  content:"→";
  margin-right:0.25em
}

a:hover {
  text-decoration: none;
}

tr[role="link"]:hover {
  outline: solid 2px blue;
  cursor: pointer;
}

.redacted p {
  font-family: 'Redacted Script', cursive;
}

.headings-demo h1, .headings-demo h2, .headings-demo h3, .headings-demo h4 {
  margin-top: 0;
  margin-bottom: 0;
}

.headings-demo-section {
  outline: solid 3px;
  margin: 1rem;
  padding: 1rem;
}

.headings-demo-section {
  outline-color: red;
}

.headings-demo-section .headings-demo-section {
  outline-color: green;
}

.headings-demo-section .headings-demo-section .headings-demo-section  {
  outline-color: blue;
}

.headings-demo-section .headings-demo-section .headings-demo-section .headings-demo-section {
  outline-color: grey;
}

.headings-demo #one:target .headings-demo-section .headings-demo-section {
  display: none;
}

.headings-demo #two:target .headings-demo-section .headings-demo-section .headings-demo-section {
  display: none;
}      

.headings-demo #three:target .headings-demo-section .headings-demo-section .headings-demo-section .headings-demo-section {
  display: none;
}

h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus, button:focus {
  outline: solid 2px blue;
  outline-offset: 2px;
  /*box-shadow: 0 0 0 0.25rem;*/
}

.assertive {
  border: solid 2px red;
}

.polite {
  border: solid 2px green;
}

.assertive, .polite {
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}



/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden {
  display: none !important;
}

/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
*    causes content to wrap 1 word per line:
*    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
* Extends the .sr-only class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/

.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
* Hide visually and from screen readers, but maintain layout
*/

.invisible {
  visibility: hidden;
}

/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
*    `contenteditable` attribute is included anywhere else in the document.
*    Otherwise it causes space to appear at the top and bottom of elements
*    that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
*    `:before` to contain the top-margins of child elements.
*/

.clearfix:before,
.clearfix:after {
  content: " ";
  /* 1 */
  display: table;
  /* 2 */
}

.clearfix:after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *:before,
  *:after {
    background: transparent !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }
  a,
  a:visited {
    text-decoration: underline;
  }
  a[href]:after {
    content: " (" attr(href) ")";
  }
  abbr[title]:after {
    content: " (" attr(title) ")";
  }
  /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */
  a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  }
  pre {
    white-space: pre-wrap !important;
  }
  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }
  /*
     * Printing Tables:
     * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
     */
  thead {
    display: table-header-group;
  }
  tr,
  img {
    page-break-inside: avoid;
  }
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  h2,
  h3 {
    page-break-after: avoid;
  }
}
