:root,
::backdrop {
  /* Set sans-serif & mono fonts */
  --sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir,
    "Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica,
    "Helvetica Neue", sans-serif;
  --mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  --standard-border-radius: 5px;

  /* Default (light) theme */
  --bg: #fff;
  --accent-bg: #f5f7ff;
  --text: #212121;
  --text-light: #585858;
  --border: #898EA4;
  --accent: #0d47a1;
  --accent-hover: #1266e2;
  --accent-text: var(--bg);
  --code: #d81b60;
  --preformatted: #444;
  --marked: #ffdd33;
  --disabled: #efefef;
}

/* Reset default appearance */
.apply-simplecss textarea,
.apply-simplecss select,
.apply-simplecss input,
.apply-simplecss progress {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}


/* Add a little padding to ensure spacing is correct between content and header > nav */

/* Format headers */
.apply-simplecss h1 {
  font-size: 3rem;
}

.apply-simplecss h2 {
  font-size: 2.6rem;
  margin-top: 3rem;
}

.apply-simplecss h3 {
  font-size: 2rem;
  margin-top: 3rem;
}

.apply-simplecss h4 {
  font-size: 1.44rem;
}

.apply-simplecss h5 {
  font-size: 1.15rem;
}

.apply-simplecss h6 {
  font-size: 0.96rem;
}

.apply-simplecss p {
  margin: 1.5rem 0;
}

/* Prevent long strings from overflowing container */
.apply-simplecss p,
.apply-simplecss h1,
.apply-simplecss h2,
.apply-simplecss h3,
.apply-simplecss h4,
.apply-simplecss h5,
.apply-simplecss h6 {
  overflow-wrap: break-word;
}

/* Fix line height when title wraps */
.apply-simplecss h1,
.apply-simplecss h2,
.apply-simplecss h3 {
  line-height: 1.1;
}

/* Reduce header size on mobile */
@media only screen and (max-width: 720px) {
    .apply-simplecss h1 {
    font-size: 2.5rem;
  }

  .apply-simplecss h2 {
    font-size: 2.1rem;
  }

  .apply-simplecss h3 {
    font-size: 1.75rem;
  }

  .apply-simplecss h4 {
    font-size: 1.25rem;
  }
}

.apply-simplecss ul {
  list-style-type: disc; /* Default bullet */
  margin: 1rem 0;
  padding-left: 1.5rem; /* Indent */
}

.apply-simplecss ul li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  position: relative;
}

.apply-simplecss ul li::before {
  content: "✔"; /* Custom bullet */
  color: #4CAF50; /* Green checkmark */
  font-size: 0.8rem;
  position: absolute;
  left: -1rem; /* Align custom bullet */
  top: 0.2rem;
}

/* Styling ordered lists */
.apply-simplecss ol {
  list-style-type: decimal; /* Numbered bullets */
  margin: 1rem 0;
  padding-left: 2rem; /* Indent for numbers */
}

.apply-simplecss ol li {
  margin-bottom: 0.5rem;
  padding-left: 0.2rem;
}

ol li::marker {
  font-weight: bold;
  color: #007BFF; /* Blue color for numbers */
  font-size: 1.1rem;
}

/* Styling nested lists */
.apply-simplecss ul ul,
.apply-simplecss ol ol,
.apply-simplecss ul ol,
.apply-simplecss ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 2rem; /* Additional indent for nested lists */
}

.apply-simplecss ul ul li::before {
  content: "•"; /* Smaller bullet for nested lists */
  color: #888; /* Subtle gray color */
  left: -1rem;
}

/* Format links & buttons */
.apply-simplecss a,
.apply-simplecss a:visited {
  color: var(--accent);
}

.apply-simplecss a:hover {
  text-decoration: none;
}

.apply-simplecss button,
.apply-simplecss .button,
.apply-simplecss a.button, /* extra specificity to override a */
.apply-simplecss input[type="submit"],
.apply-simplecss input[type="reset"],
.apply-simplecss input[type="button"],
.apply-simplecss label[type="button"] {
  border: 1px solid var(--accent);
  background-color: var(--accent);
  color: var(--accent-text);
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  line-height: normal;
}

.apply-simplecss .button[aria-disabled="true"], 
.apply-simplecss input:disabled,
.apply-simplecss textarea:disabled,
.apply-simplecss select:disabled,
.apply-simplecss button[disabled] {
  cursor: not-allowed;
  background-color: var(--disabled);
  border-color: var(--disabled);
  color: var(--text-light);
}

.apply-simplecss input[type="range"] {
  padding: 0;
}

/* Set the cursor to '?' on an abbreviation and style the abbreviation to show that there is more information underneath */
.apply-simplecss abbr[title] {
  cursor: help;
  text-decoration-line: underline;
  text-decoration-style: dotted;
}

.apply-simplecss button:enabled:hover,
.apply-simplecss .button:not([aria-disabled="true"]):hover,
.apply-simplecss input[type="submit"]:enabled:hover,
.apply-simplecss input[type="reset"]:enabled:hover,
.apply-simplecss input[type="button"]:enabled:hover,
.apply-simplecss label[type="button"]:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  cursor: pointer;
}

.apply-simplecss .button:focus-visible,
.apply-simplecss button:focus-visible:where(:enabled),
.apply-simplecss input:enabled:focus-visible:where(
  [type="submit"],
  [type="reset"],
  [type="button"]
) {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Format navigation */
.apply-simplecss header > nav {
  font-size: 1rem;
  line-height: 2;
  padding: 1rem 0 0 0;
}

/* Use flexbox to allow items to wrap, as needed */
.apply-simplecss header > nav ul,
.apply-simplecss header > nav ol {
  align-content: space-around;
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

/* List items are inline elements, make them behave more like blocks */
.apply-simplecss header > nav ul li,
.apply-simplecss header > nav ol li {
  display: inline-block;
}

.apply-simplecss header > nav a,
.apply-simplecss header > nav a:visited {
  margin: 0 0.5rem 1rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--standard-border-radius);
  color: var(--text);
  display: inline-block;
  padding: 0.1rem 1rem;
  text-decoration: none;
}

.apply-simplecss header > nav a:hover,
.apply-simplecss header > nav a.current,
.apply-simplecss header > nav a[aria-current="page"],
.apply-simplecss header > nav a[aria-current="true"] {
  border-color: var(--accent);
  color: var(--accent);
  cursor: pointer;
}

/* Reduce nav side on mobile */
@media only screen and (max-width: 720px) {
    .apply-simplecss header > nav a {
    border: none;
    padding: 0;
    text-decoration: underline;
    line-height: 1;
  }
}

/* Consolidate box styling */
.apply-simplecss aside, 
.apply-simplecss details,
.apply-simplecss pre,
.apply-simplecss progress {
  background-color: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: var(--standard-border-radius);
  margin-bottom: 1rem;
}

.apply-simplecss aside {
  font-size: 1rem;
  width: 30%;
  padding: 0 15px;
  margin-inline-start: 15px;
  float: right;
}
.apply-simplecss *[dir="rtl"] aside {
  float: left;
}

/* Make aside full-width on mobile */
@media only screen and (max-width: 720px) {
    .apply-simplecss aside {
    width: 100%;
    float: none;
    margin-inline-start: 0;
  }
}

.apply-simplecss article,
.apply-simplecss fieldset,
.apply-simplecss dialog {
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--standard-border-radius);
  margin-bottom: 1rem;
}

.apply-simplecss article h2:first-child,
.apply-simplecss section h2:first-child,
.apply-simplecss article h3:first-child,
.apply-simplecss section h3:first-child {
  margin-top: 1rem;
}

.apply-simplecss section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1rem;
  margin: 3rem 0;
}

/* Don't double separators when chaining sections */
.apply-simplecss section + section,
.apply-simplecss section:first-child {
  border-top: 0;
  padding-top: 0;
}

.apply-simplecss section + section {
  margin-top: 0;
}

.apply-simplecss section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.apply-simplecss details {
  padding: 0.7rem 1rem;
}

.apply-simplecss summary {
  cursor: pointer;
  font-weight: bold;
  padding: 0.7rem 1rem;
  margin: -0.7rem -1rem;
  word-break: break-all;
}

.apply-simplecss details[open] > summary + * {
  margin-top: 0;
}

.apply-simplecss details[open] > summary {
  margin-bottom: 0.5rem;
}

.apply-simplecss details[open] > :last-child {
  margin-bottom: 0;
}

/* Format tables */
.apply-simplecss table {
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.apply-simplecss figure > table {
  width: max-content;
  margin: 0;
}

.apply-simplecss td,
.apply-simplecss th {
  border: 1px solid var(--border);
  text-align: center;
  padding: 0.5rem;
}

.apply-simplecss th {
  background-color: var(--accent-bg);
  font-weight: bold;
}

.apply-simplecss tr:nth-child(even) {
  /* Set every other cell slightly darker. Improves readability. */
  background-color: var(--accent-bg);
}

.apply-simplecss table caption {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* Format forms */
.apply-simplecss textarea,
.apply-simplecss select,
.apply-simplecss input,
.apply-simplecss button,
.button {
  font-size: inherit;
  font-family: inherit;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: var(--standard-border-radius);
  box-shadow: none;
  max-width: 100%;
  display: inline-block;
}
.apply-simplecss textarea,
.apply-simplecss select,
.apply-simplecss input {
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--border);
}
.apply-simplecss label {
  display: block;
}
.apply-simplecss textarea:not([cols]) {
  width: 100%;
}

/* Add arrow to drop-down */
.apply-simplecss select:not([multiple]) {
  background-image: linear-gradient(45deg, transparent 49%, var(--text) 51%),
    linear-gradient(135deg, var(--text) 51%, transparent 49%);
  background-position: calc(100% - 15px), calc(100% - 10px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: 25px;
}
.apply-simplecss *[dir="rtl"] select:not([multiple]) {
  background-position: 10px, 15px;
}

/* checkbox and radio button style */
.apply-simplecss input[type="checkbox"],
input[type="radio"] {
  vertical-align: middle;
  position: relative;
  width: min-content;
}

.apply-simplecss input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline-block;
}

.apply-simplecss input[type="radio"] {
  border-radius: 100%;
}

.apply-simplecss input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: var(--accent);
}

.apply-simplecss input[type="checkbox"]:checked::after {
  /* Creates a rectangle with colored right and bottom borders which is rotated to look like a check mark */
  content: " ";
  width: 0.18em;
  height: 0.32em;
  border-radius: 0;
  position: absolute;
  top: 0.05em;
  left: 0.17em;
  background-color: transparent;
  border-right: solid var(--bg) 0.08em;
  border-bottom: solid var(--bg) 0.08em;
  font-size: 1.8em;
  transform: rotate(45deg);
}
.apply-simplecss input[type="radio"]:checked::after {
  /* creates a colored circle for the checked radio button  */
  content: " ";
  width: 0.25em;
  height: 0.25em;
  border-radius: 100%;
  position: absolute;
  top: 0.125em;
  background-color: var(--bg);
  left: 0.125em;
  font-size: 32px;
}

/* Makes input fields wider on smaller screens */
@media only screen and (max-width: 720px) {
    .apply-simplecss textarea,
    .apply-simplecss select,
    .apply-simplecss input {
    width: 100%;
  }
}

/* Set a height for color input */
.apply-simplecss input[type="color"] {
  height: 2.5rem;
  padding:  0.2rem;
}

/* do not show border around file selector button */
.apply-simplecss input[type="file"] {
  border: 0;
}

/* Misc body elements */
.apply-simplecss hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 1rem auto;
}

.apply-simplecss mark {
  padding: 2px 5px;
  border-radius: var(--standard-border-radius);
  background-color: var(--marked);
  color: black;
}

.apply-simplecss mark a {
  color: #0d47a1;
}

.apply-simplecss img,
.apply-simplecss video {
  max-width: 100%;
  height: auto;
  border-radius: var(--standard-border-radius);
}

.apply-simplecss figure {
  margin: 0;
  display: block;
  overflow-x: auto;
}

.apply-simplecss figure > img,
.apply-simplecss figure > picture > img {
  display: block;
  margin-inline: auto;
}

.apply-simplecss figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-block: 1rem;
}

.apply-simplecss blockquote {
  margin-inline-start: 2rem;
  margin-inline-end: 0;
  margin-block: 2rem;
  padding: 0.4rem 0.8rem;
  border-inline-start: 0.35rem solid var(--accent);
  color: var(--text-light);
  font-style: italic;
}

.apply-simplecss cite {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: normal;
}

.apply-simplecss dt {
    color: var(--text-light);
}

/* Use mono font for code elements */
.apply-simplecss code,
.apply-simplecss pre,
.apply-simplecss pre span,
.apply-simplecss kbd,
.apply-simplecss samp {
  font-family: var(--mono-font);
  color: var(--code);
}

.apply-simplecss kbd {
  color: var(--preformatted);
  border: 1px solid var(--preformatted);
  border-bottom: 3px solid var(--preformatted);
  border-radius: var(--standard-border-radius);
  padding: 0.1rem 0.4rem;
}

.apply-simplecss pre {
  padding: 1rem 1.4rem;
  max-width: 100%;
  overflow: auto;
  color: var(--preformatted);
}

/* Fix embedded code within pre */
.apply-simplecss pre code {
  color: var(--preformatted);
  background: none;
  margin: 0;
  padding: 0;
}

/* Progress bars */
/* Declarations are repeated because you */
/* cannot combine vendor-specific selectors */
.apply-simplecss progress {
  width: 100%;
}

.apply-simplecss progress:indeterminate {
  background-color: var(--accent-bg);
}

.apply-simplecss progress::-webkit-progress-bar {
  border-radius: var(--standard-border-radius);
  background-color: var(--accent-bg);
}

.apply-simplecss progress::-webkit-progress-value {
  border-radius: var(--standard-border-radius);
  background-color: var(--accent);
}

.apply-simplecss progress::-moz-progress-bar {
  border-radius: var(--standard-border-radius);
  background-color: var(--accent);
  transition-property: width;
  transition-duration: 0.3s;
}

.apply-simplecss progress:indeterminate::-moz-progress-bar {
  background-color: var(--accent-bg);
}

.apply-simplecss dialog {
  max-width: 40rem;
  margin: auto;
}

.apply-simplecss dialog::backdrop {
  background-color: var(--bg);
  opacity: 0.8;
}

@media only screen and (max-width: 720px) {
    .apply-simplecss dialog {
    max-width: 100%;
    margin: auto 1em;
  }
}

/* Superscript & Subscript */
/* Prevent scripts from affecting line-height. */
.apply-simplecss sup,
.apply-simplecss sub {
  vertical-align: baseline;
  position: relative;
}

.apply-simplecss sup {
  top: -0.4em;
}

.apply-simplecss sub { 
  top: 0.3em; 
}

/* Classes for notices */
.apply-simplecss .notice {
  background: var(--accent-bg);
  border: 2px solid var(--border);
  border-radius: var(--standard-border-radius);
  padding: 1.5rem;
  margin: 2rem 0;
}
