:root {
  --demyst-color: #119F9D;
  --demyst-color-greyed: #92bcbb;
  --demyst-color-light: #2EC1C7;
  --demyst-color-dark: #0e7270;  /* for links */
  --demyst-color-accent: #15E555;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 4rem;   /* snap named links below nav bar */
}


@font-face {
  font-family: "Open Sans";
  src: url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400..700;1,400&display=swap");
}
/* font weight reference:
  font-weight: 300 (Light)   
  font-weight: 400 (Normal) or font-weight: normal 
  font-weight: 500 (Medium) 
  font-weight: 600 (Semi Bold) 
  font-weight: 700 (Bold) or font-weight: bold 
  font-weight: 800 (Extra Bold) 
  font-weight: 900 (Black)  
*/

body {
  font-family: "Open Sans", Aptos, Arial, sans-serif;
  margin: 0;
  /* the next three lines create a flexbox for the header and footer(?) */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main_content {
  flex: 1;
  width: 80%;  /* 10% left/right margins */
  max-width: 64rem;   /* but not too wide on large screens */
  margin: auto;   /* center horiz */
}

.main_content a:link, a:visited {
  color: var(--demyst-color-dark);
	text-decoration: none;
  text-decoration-line: none;
}

/* (testing extref with darker link, doesn't really work
.main_content a.extref:link, a:visited {
  color: #04201f;
} */

.main_content a:hover {
  text-decoration: underline;
}
 
.main_content a.intref:hover,   /* style for internal links; for now make siteref and toclink the same */
.main_content a.siteref:hover, 
.main_content a.toclink:hover {   
  color: var(--demyst-color-accent);
  text-decoration: underline dotted 2px;
}

.main_content a.extref::after {   /* add icon to internal links */
  content: '⇗';
  color: #bbbbbb;
  line-height: 0.5rem;   /* keep link char from expanding line height */
}

/* internal link indicator (not used, doesn't work) 
.main_content a.intref {
  position:relative;
  overflow:hidden;
}
.main_content a.intref::after {
  content:'►';
  font-size:10px;
  position:absolute;
  top:.5em;
  left:-1em;
  opacity:0;
  transition:all .5s ease-in-out;
}
.main_content a.intref:hover::after {
  right:1em;
  opacity:1;
}
*/

h1, h2, h3, h4 {
font-family: "Verdana", Arial, sans-serif;
}

h1 {
  font-size: 1.6rem;   /* tone down h1 (default is 2em) */
}

h2 {
  font-size: 1.3rem;   /* tone down h2 (default is 1.5em) */
  padding-top: 1rem;
}

h3 {
  padding-top: 0.75rem;
}


/*** Navigation menu ***/
.navbar {
  display: flex;
  flex-direction: column;   /* put the fader below the rest of the menu */
  align-items: center;
  position: fixed;   /* keep the rest of the page below the navbar regardless of navbar height */
  z-index: 100;   /* keep navbar on top of all other content */
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}

.navbar_container {
/*  holds the logo and menu items above the fader flexbox element */
  display: flex;
  width: 100%; /* Ensure it takes full width */
  background-image: linear-gradient(to right, var(--demyst-color), var(--demyst-color-light), var(--demyst-color-accent));
  /* container: navcont / inline-size; /* can't get working */
}

a.logo {
  display: flex;   /* allow vertical centering of logo inside <a> */
  margin: 0.1rem;   /* leave space for menu hover grow to stay inside background */
  margin-right: 0.2rem;   /* space before menu items */
  padding: 0 0.3rem 0 1rem;
  align-items: center;
  /* border: 1px solid pink; */
}

.logo_img {
  height: 2.25rem;  /* logo height */
  width: auto;
  /* border: 1px solid red; */
}

.menu {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap; /* Allow wrapping */
  margin: 0;
  padding: 0;
  font-size: 1.6rem;
  /* border: 1px solid orange; */
  color: white;
}

.menu li {   /* make sure other li styles don't affect the menu items */
  font-size: 1.6rem;
  padding: 0;
  margin: 0;
}

.menu a {
  display: inline-block;   /* make transform on hover work */ 
  color: white;
  text-decoration: none;
  margin: 0.15rem;   /* leave space for menu hover grow to stay inside background */
  padding-top: 0.5rem;
  padding-right: 0.7rem;
  padding-bottom: 0.5rem;
  padding-left: 0.7rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.1s;
  /* border: 1px solid yellow;  */
  /* note: background color is not affected by the line-height or height, only by the font-size and padding */
}

.menu a:hover, .logo:hover {
background-color: #0e8280;
transform: scale(1.1);
/* transition: all 0.2s; */
}

/* indicate current section of the website */
.menu a.current {
  text-decoration: underline solid rgba(255, 255, 255, 0.75) 0.2rem;
  text-underline-offset: 0.4rem;
}

.navbar_fader {  /* fading whitespace to separate scrolling text below menu */
  height: 1.25rem;
  width: 100%;
  background-image: linear-gradient(to bottom, white 60%, rgba(255, 255, 255, 0.373));
}

.navbar_spacer {  /* keep nav from covering content below */
  margin: 0;
  padding-top: 3rem;
}

/* can't get this to work
@container navcont (min-block-size > 10px) {
  .navbar_container {
    border: red 1px solid;
  }
  .navbar_fader {
    display: none;
  }
}  */


/* Footer */
.footbar {
  display: flex;
  width: 100%;
  min-height: 2rem;
  margin-top: 2rem;
  padding: 0rem 1rem;
  padding-bottom: 0.1rem;
  align-items: center;
  background-image: linear-gradient(to right, var(--demyst-color), var(--demyst-color-light), var(--demyst-color-accent));
  color: white;
  font-weight: bold;
}

.footbar_left {
  padding-right: 2rem;   /* space away from "about" on the right */
}

.footbar img {
  vertical-align: middle;   /* vertically center icons with text */
  height: 1.2rem;
  width: auto;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
}

.footbar_about {
  margin-left: auto;
  text-align: end;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
}

.footbar a {
  text-decoration: none;
  color: white;
}

.footbar a:hover {
  background-color: #0e8280;
  border-bottom: 0.25rem solid #0e8280;   /* flesh out bottom highlight since padding just shrinks the icons */
  box-shadow: 0 0 0 0.25rem #0e8280;   /* expand further with solid "shadow" */
}


/*** Tooltip ***/
/* By Jim Taylor. Last update 2025-03-19. */

  /* Select elements with data-tooltip attribute and put the text invisibly "before" */
[data-tooltip]::before {
  content: attr(data-tooltip);  /* get the tooltip text */
  position: relative;
  display: inline-block;   /* not sure we need this */
  background-color: #ffe8be;
  font-size: 75%;
  color: #000;
  text-shadow: none;   /* don't carry over the shadow for the element text */
  border-radius: 0.375rem;
  padding: 0.375rem 1em;
  max-width: 60vw;  /* don't let the tooltip get wider than 60% of the viewport */
  position: absolute;
  z-index: 10;
  transform: translateY(-90%);   /* put it above the element (90% keeps it a little closer) */
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s, visibility 0.5s; /* fade out; include both opacity and visibility so it doesn't hide before opacity transitions */
}

  /* postpend a tooltip Unicode icon 
[data-tooltip]::after {
  content: "ⓘ";
  color: #808080;
  font-size: 70%;
  font-weight: bold;
  vertical-align: text-top;
} */

  /* postpend a tooltip icon using SVG */
  /* but only if the element doesn't have the no-icon class */
  [data-tooltip]:not(.no-icon)::after {
    content: "";
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    background-image: url('images/info_icon.svg');
    filter: invert(60%) sepia(0%);
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: text-top;
  }

  /* Show the tooltip on hover and focus */
[data-tooltip]:hover::before,
[data-tooltip]:focus::before {
  visibility: visible;
  opacity: 1;
  transition: opacity 1s;   /* fade in */
}
  /* subtly highlight the associated text */
[role="tooltip"]:hover,
[role="tooltip"]:focus {
  text-shadow: 1px 1px #cce6e5;
}


/* Main menu */

.welcome {
  font-size: 150%;
}

.topic-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 57rem;   /* limit to 2 columns on large screens */
}

.topic-grid a:hover {
  text-decoration: none;
}

.topic-box {
  float: left;
  width: 20rem;
  margin: 1.25rem;
  display: flex;
  /* justify-content: left; */
  align-items: center;
  text-decoration: none;
}

.topic-box img {
  height: auto;
  width: 5rem;
}

.topic-caption {
  /* position: absolute; */
  /* font-family: Verdana, sans-serif; */
  font-size: xx-large;
  font-weight: 700;
  padding: 0.625rem;
  color: black;
  /* background-color: white; */
}

.topic-caption:hover, .page-menu-item a:hover {
  color: #15E555;
  text-decoration: none;   /* override underline from earlier a styles */
  transition: all 0.3s;
}

/* Page-level menu */
.page-menu-item {
  display: block;
  font-family: "Verdana", Arial, sans-serif;
  font-size: x-large;
  font-weight: bold;
  text-decoration: none;
  margin: 1.5rem 0rem;
}

.coming {
  font-size: 75%;
  color: #15E555;
}


/* Auto-number headers 2 through 4 
 * but decided not to use this
h2:before {
  counter-increment: h2;
  content: counter(h2) ". "
}
h3:before {
  counter-increment: h3;
  content: counter(h2) "." counter(h3) ". "
}
h4:before {
  counter-increment: h4;
  content: counter(h2) "." counter(h3) "." counter(h4) ". "
}
*/


/* Misc */

.demyst-color {
  color: var(--demyst-color);
}

/* .norm_p {
  nothing for now
} */

.bullet_intro {
  margin-bottom: 0.5rem;
}

ul {
  margin-top: 0.5rem; /* match bottom margin of bullet_intro since they collapse together */
  margin-bottom: 0;
}

li {
  padding-bottom: 0.5rem;
}

li:last-child {   /* remove exorbitant default spacing after last item */
  padding-bottom: 0;
}

ul.nobullet {
  list-style-type: none;
}

ul.whatsnew {
  padding-left: 1rem;
}

ul.whatsnew li {
  list-style: none;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 10ch;   /* indent lines after first to go past the date (matched padding and neg indent for first line) */
  text-indent: -10ch;
}

ul.whatsnew ul {   /* snug nested list up to parent */
  margin-top: 0.2rem;
}

.indent_list_p {   /* indent lines after first for "1)" or "a)" style lists */ 
  margin-left: 1rem;
  text-indent: -1rem;
}

.bold {
  font-weight: bold;
}

.mono {
  font-family: Consolas, Courier New, monospace;
  font-weight: bold;
  color: #5f5f5f;
}

.superscript {
  font-size: 75%;
  vertical-align: super;
  line-height: 1;   /* keep it from expanding the line height */
}

.subscript {
  font-size: 75%;
  vertical-align: sub;
  line-height: 1;   /* keep it from expanding the line height */
}

.norm_pic {
  text-align:center;
  margin: 0 auto;   /* make sure it really is centered */
}

.norm_pic > img {
  border: 0;
  max-width: 30rem;   /* nominal 480px */
  width: 100%;   /* scale to fit */
  height: auto;
}

.multi_pic {   /* container for multiple images; stack on small screen */ 
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 2rem;
}

.table_simple {
  border-collapse: collapse;
  font-size:80%;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.table_simple th {
  font-weight: normal;
  background-color: #cce6e5;
  text-align: left;
}

.table_simple th, .table_simple td {
  border: solid #cce6e5 1px;
  padding: 0.2rem 0.5rem;
  vertical-align: middle;
}

.table_simple_scroll {   /* for tables wider than the page */
  overflow-x: auto;
}

.toc {
  column-count: 2;
  column-gap: 4rem;
  column-rule: 1px solid #92bcbb;
  font-size: 90%;
}

.toc ul {
  list-style-type: none;
  margin-top: 0;   /* remove top margin so both columns are vertically aligned at the top */
  margin-left: -1rem;   /* reduce depth of indent */
}

.toc li {
  padding-bottom: 0;
}

a.tocback:hover::after {
  content: '↰';   /* was using ⮭ but not supported in all browsers */
  display: inline-block;
  margin-left: 0.5rem;
  transform: rotate(90deg);   /* since there isn't a Unicode bent arrow that points up */
  line-height: 1;   /* keep link char from expanding line height */
}

a.tocback:hover{
  text-decoration: #92bcbb underline;
  text-decoration: none;
}

.two-col {
  display: grid;
  grid-template-columns: 8em auto;
  row-gap: 0.25rem;
}

.two-col-header {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-weight: bold;
  text-decoration: underline;
  text-decoration-color: #2EC1C7;
}

.two-col-term {
  font-style: italic;
  padding-top: 0.625rem;
}

.two-col-descr {
  padding-top: 0.625rem;
}

.note {
  font-size: 90%;
  margin-left: 4rem;
  margin-top: 1.25rem;
  padding: 0 0.75rem 0.1rem 1rem;
  border: solid 1px #92bcbb;
  background: #fcffff;
  border-radius: 8px;
}

.note_small {   /* additional class to override regular note */
  margin-left: 2rem;
  margin-top: 1rem;
}

.note p {
  margin-top: 1px;   /* line up the top of the header with the top border */
  margin-bottom: 0.4rem;
}

.note_header {
  margin-left: -1rem;
  margin-right: 0.75rem;
  padding-top: 0.1rem;
  padding-right: 0.4rem;
  padding-left: 0.5rem;
  padding-bottom: 0.1rem;
  border-radius: 3px;
  border-top-left-radius: 8px;   /* match radius of note border */
  border-bottom-left-radius: 0px;
  font-weight: bold;
  color: white;
  background-color: #92bcbb;
}

.note ul {   /* if there's a ul inside a note, reduce left margin and vertical spacing */
  padding-left: 0.75rem;
  margin-top: 1px;   /* line up the top of the header with the top border */
  margin-bottom: 0rem;
}

.note li {  
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
}

/* note:can't use list-style-type because we want to style the entire a, to ensure all text is clickable, but a doesn't have display: list-item property */
.toclink_note>li>a::before {
  content: "▹ ";
  color: --demyst-color-dark;
}

/*** FAQ stuff ***/

.faq-controls button {
  padding: 0.4em 1em;
  font-size: 1em;
  cursor: pointer;
  margin-bottom: 1rem;
  border: none;
  border-radius: 0.4rem;
  font-weight: bold ;
  color: white;
  background: var(--demyst-color);
}

details.faq::details-content {
  min-height: 1.5rem;   /* keep closed faqs vertically spaced out */
  opacity: 0;   /* for transition effect on open */
}

details.faq[open]::details-content {
  opacity: 1;
  transition: opacity 0.8s ease;
  margin-bottom: 2rem;   /* add more space between faqs when open */
}

.faq p,
.faq ul,
.faq ol {
  margin-top: 0.5rem;
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.faq summary {
  margin-left: 2rem;   /* this will be backed out to 0 left margin by ::before */
  cursor: pointer;
}

.faq summary::marker {
  content: none;   /* hide the default triangle marker */
}

.faq-icon::before {
  /* summary::marker doesn't work in Chrome, can't style text, can't set width of image */
  /* needs to be clickable, but can't use summary::before because it's not in the DOM */
  /* but can use faq-icon::before because it's inside the clickable summary element */
  content: "? ";
  font-weight: bold;
  color: white;
  background-color: #119F9D;
  position: absolute;
  float: left;
  font-size: 1.5rem;
  line-height: 1;
  margin-top: 0.3rem;   /* top-align with text */
  margin-right: 0.75rem;
  margin-left: -2rem;   /* back up to left edge to "undo" the margin of the summary */
  padding: 0.2rem;
  border-radius: 0.2rem;
}

.faq:target summary {
  /* highlight the faq when it's targeted (by a hash in the URL) */
  background-color: var(--demyst-color-greyed);   
}

  /* WARNING: Need to fix this if menu size increases (or add container query) */
  /* Responsive for small screens (30rem = 480px) */
  /* iPhone SE: 23.4375rem 375px */
  /* Pixel 7: 25.75rem 412px */
@media screen and (max-width: 30rem) {

  .navbar_container {
    overflow-x: auto;   /* allow scrolling */
    white-space: nowrap;   /* keep menu items on one line */
  }
  .menu {
    display: inline-flex; /* Change to inline-flex to prevent wrapping */
    flex-wrap: nowrap; /* Prevent wrapping */
  }
    a.logo {
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
  }
  .logo_img {
    height: 2.1rem;  /* shrink logo a bit */
  }
  .menu a {
    margin-top: 0.6rem;;
    padding-top: 0.6rem;
    padding-right: 0.1rem;   /* space menu items closer vertically */
    padding-bottom: 0.6rem;   /* adjust menu higlight area */
    padding-left: 0.1rem;
    font-size: 1.1rem;   /* shrink font a bit */
    line-height: 0.1;   /* space closer vertically when text wraps */
    /* border: 1px solid yellow; */
  }
  .menu li {
    font-size: 1.1rem;   /* match font */
  }
  .topic-caption {
    font-size: x-large;
  }
  .welcome {
    font-size: 110%;
  }
  .main_content {
    width: 90%;  /* 5% left/right margins */
  }
  .footbar{
    min-height: 1rem;
    font-size: 90%;
  }
  .footbar img {
    height: 1rem;
  }}

/* old responsive stuff for small screens
/*  .navbar {
/*    position: relative; /* let the menu scroll off screen */
/*  .navbar_fader {
/*    display: none;   /* don't need fader */
/*  }
/*  .navbar_spacer {  /* don't need spacer */
/*    padding-top: 0;
/*  }
*/


  /* Responsive for medium screens (63.5rem = 1016px) */
  /* Right now on only for TOC */
@media screen and (max-width: 63.5rem) {
  .toc {
    column-count: 1;
  }
}

/* ©2024-2025 Jim Taylor */
