@charset "UTF-8";
/**
 * A simple CSS reset and base styles for typography, lists, and tables.
 * It uses CSS variables for easy customization of fonts, colors, and spacing.
 * The font sizes are based on a minor second scale (1.067) from typescale.com.
 * 
 * 1. CSS Variables: Define custom properties for fonts, colors, and spacing.
 * 2. Base Styles: Set default styles for body, headings, paragraphs, lists, and tables.
 * 3. Text Styling: Style for mark and blockquote elements.
 * 4. List Styling: Set margins and font weights for lists.
 * 5. Table Styling: Define styles for tables, including caption, headers, and alternating body colors.
 * 6. Form Styling: Style for form elements like fieldset, label, input, select, textarea, and buttons.
 * 7. Layout: A utility class for horizontal stacking of elements using flexbox.
 * 8. Article: Styles for article elements, including header and time.
 * 9. Navigation: Styles for table of contents and root navigation header.
 * 9. A. Pagination: Styles for pagination elements.
 * 10. Trays: Styles for hamburger menu and sliding trays for navigation.
 * 11. Animations: Define keyframe animations and related styles.
 */

/* 1. CSS Variables */
:root {
  /* shadows */
  --shadow-down: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
  /* Not sure what these are */
  --global-header-size: 49px;
  --global-header-z-index: 5;
  --sidebar-width: 200px;
}

/* 2. Base Styles */
html,
body {
  font-family: var(--body-font);
  font-size: var(--text-size-m);
  line-height: 1.5;
  color: var(--global-text-color);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--size-xxxl) * 2);
}

/* Should I * rule this? */
fieldset {
  box-sizing: border-box;
}

/* var(--text-size-h1) */
html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote {
  padding: 0;
  margin: 0;
  margin-block-start: 0;
  margin-block-end: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: var(--size-xl) 0 var(--size4);
}

hgroup > h1,
hgroup > h2,
hgroup > h3,
hgroup > h4,
hgroup > h5 {
  margin: 0;
  text-align: left;
}

p,
dl,
table {
  margin: var(--size4) 0;
}

hr {
  margin-block-start: var(--size-xl);
  margin-block-end: var(--size-xl);
  color: var(--neutral70);
  border-style: solid;
  border-width: 1px;
  border-bottom: 0;
}

/* 3. Text Styling */
h1,
h2,
h3,
h4,
h5 {
  text-transform: uppercase;
  line-height: 1;
}

h1 {
  font-size: var(--text-size-h1);
  text-align: center;
}
h2 {
  font-size: var(--text-size-h2);
}
h3 {
  font-size: var(--text-size-h3);
}
h4 {
  font-size: var(--text-size-h4);
}
h5 {
  font-size: var(--text-size-h5);
}
h6 {
  font-size: var(--text-size-h6);
  font-weight: var(--text-bold);
}

mark {
  background-color: var(--neutral90);
}

b,
strong {
  font-weight: var(--text-bold);
}

i,
em,
var {
  font-style: var(--text-italic);
}

sup,
sub {
  font-size: var(--text-size-xs);
}

code,
samp {
  padding: var(--size1) var(--size2);
  font-family: var(--code-font-family);
  background-color: var(--code-highlight);
}

ins {
  background-color: var(--text-highlight);
  text-decoration: underline;

  &::before {
    content: "+ ";
  }
}

del {
  text-decoration: line-through;
}

abbr {
  cursor: pointer;
}

b {
  text-transform: uppercase;
}

blockquote {
  padding: var(--size4);
  border: solid 1px var(--neutral00);
  margin: var(--size4);
  margin-inline: var(--size4);

  & > p:first-of-type {
    margin-top: 0;
  }

  & > p:last-of-type {
    margin-bottom: 0;
  }
}

a {
  color: var(--link);
}

h1 > a,
h2 > a {
  color: var(--global-text-color);
  text-decoration: none;
}

/* 4. List Styling */
ol,
ul {
  margin-block-start: var(--size4);
  margin-block-end: var(--size4);
  padding-inline-start: var(--size-xl);
  padding-inline-end: var(--size4);
}

ol > li,
ul > li {
  padding: 0 0 0 var(--size-xl);
  margin: var(--size3) 0 var(--size3) var(--size4);
}

ol > li > ol,
ul > li > ul {
  padding-inline-start: var(--size2);
}

ol > li > ol {
  list-style-type: upper-alpha;
}

dl,
dt,
dd {
  margin-inline-start: 0;
}

dt {
  display: inline;
  font-weight: bold;
}

dd {
  display: contents;
}

dd::after {
  content: "";
  display: block;
  margin: 0.5em 0;
}

/* 5. Table Styling */
.table-container {
  overflow-x: auto;
}

table {
  border: 0;
  border-collapse: collapse;
  border-spacing: 0;
}

table:has(caption) {
  margin-top: var(--size-xl);
}

table th,
table td {
  padding: var(--size2) var(--size3);
  text-align: center;
  vertical-align: top;
}

table > caption {
  font-size: var(--text-size-h6);
  text-transform: uppercase;
  font-weight: var(--text-bold);
  text-align: left;
  white-space: nowrap;
}

table > thead > tr > th,
table > tfoot > tr > td,
small {
  font-size: var(--text-size-s);
}

table > thead > tr > th {
  font-weight: var(--text-bold);
  text-align: center;
  vertical-align: bottom;
}

table > tfoot > tr > td {
  text-align: left;
}

table > tbody:not(:only-of-type):nth-of-type(odd) {
  background-color: var(--neutral80);
}

/* 6. Form */
form,
fieldset {
  margin: var(--size-xl) 0;
}

fieldset {
  padding: var(--size3) var(--size4);
  border: 1px solid var(--neutral00);

  & fieldset {
    border-radius: var(--size2);
  }
}

/* fieldset:has(button) {
  padding-bottom: var(--size-xl);
} */

legend {
  font-size: var(--text-size-s);
  font-weight: var(--text-bold);
}

label {
  display: block;
  margin: var(--size-xl) 0;
  font-size: var(--text-size-xs);
  line-height: 1;
}

input:not([type="range"]),
select,
textarea {
  padding: var(--size3);
  border: 1px solid var(--neutral00);
  border-radius: var(--size2);
  margin-top: var(--size2);
  font-size: var(--text-size-s);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 3px 3px 0 0 var(--neutral20);
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  box-shadow: 1px 1px 0 0 var(--neutral20);
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  box-sizing: border-box;
  width: 100%;
}

input::placeholder,
select::placeholder,
textarea::placeholder {
  color: var(--global-text-light);
}

/* Range
label:has(> input[type="range"]) {
  display: inline-flex;
  flex-direction: column;
  gap: 15px;
  min-height: 3.75em;
  width: 100%;
}
*/

input:focus[type="range"] {
  box-shadow: none;
  outline: none;
}

input[type="range"] {
  width: 100%;
  background-color: transparent;
  appearance: none;
  -webkit-appearance: none;
}

input[type="range"]::-moz-range-track {
  background: var(--neutral60);
  border-radius: 1px;
  width: 100%;
  height: 2px;
  cursor: pointer;
}
/* didn't work with comma */
input[type="range"]::-webkit-slider-runnable-track {
  background: var(--neutral60);
  border-radius: 1px;
  width: 100%;
  height: 2px;
  cursor: pointer;
}

/* thumb */
input[type="range"]::-webkit-slider-thumb {
  margin-top: -7px;
  width: 14px;
  height: 14px;
  background: var(--neutral60);
  border: 1px solid var(--neutral50);
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--neutral60);
  border: 1px solid var(--neutral50);
  border-radius: 50%;
  cursor: pointer;
}

input[type="range"]::-ms-fill-lower {
  background: var(--neutral80);
  border: 1px solid var(--neutral60);
  border-radius: 2px;
}

input[type="range"]::-ms-fill-upper {
  background: var(--neutral60);
  border: 1px solid var(--neutral60);
  border-radius: 2px;
}

input[type="range"]::-ms-thumb {
  width: 14px;
  height: 14px;
  background: var(--neutral60);
  border: 1px solid var(--neutral50);
  border-radius: 50%;
  cursor: pointer;
  margin-top: 0px;
  /*Needed to keep the Edge thumb centred*/
}

input[type="range"]:focus::-ms-fill-lower {
  background: var(--neutral60);
}

input[type="range"]:focus::-ms-fill-upper {
  background: var(--neutral80);
}

@supports (-ms-ime-align: auto) {
  input[type="range"] {
    margin: 0;
  }
}

/* Checks & Radios */
input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline;
}

label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--text-size-xs) / 2);
  margin: 0;
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  position: relative;
  appearance: none;
  padding: 0;
  margin: 0;
  width: var(--text-size-p);
  height: var(--text-size-p);
  cursor: pointer;
  padding-block: 0;
  padding-inline: 0;
}

input[type="checkbox"]:checked::after,
input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--neutral20);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='4'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  mask-size: 90%;
  mask-position: center;
  mask-repeat: no-repeat;
}

input[type="radio"] {
  border-radius: 50%;
}

input:disabled,
select:disabled,
textarea:disabled {
  border-color: var(--neutral90);
  color: var(--neutral20);
  background-color: var(--neutral90);
}

/* button
button {
  box-sizing: border-box;
  padding: var(--size3);
  border: 1px solid var(--neutral00);
  border-radius: var(--size2);
  color: var(--neutral00);
  background-color: var(--neutral100);
  cursor: pointer;
  appearance: none;
}

button[type="submit"] {
  border-color: var(--neutral100);
  color: var(--neutral100);
  background-color: var(--neutral10);
}

button:disabled {
  background-color: var(--neutral90);
  border-color: var(--neutral90);
  color: var(--neutral20);
  cursor: not-allowed;
}

button:active:not(:disabled) {
  box-shadow: -3px -3px 0 0 var(--neutral20);
}
*/

/* 7. Layout */
.hstack {
  display: flex;
  align-items: center;
  gap: var(--text-size-xs);
}

/* 8. Article */
article {
  margin-block-start: var(--size-xxxl);
  margin-block-end: var(--size4);
}

/* article > header > hgroup > h1 {
  text-align: left;
} */

article > header > hgroup > div {
  font-size: var(--text-size-s);
  text-transform: uppercase;
}

article > header > hgroup > div > a {
  text-decoration: none;
}

article > header > time {
  font-size: var(--text-size-s);
  color: var(--global-text-light);
}

/* 9. Navigation */
.toc {
  margin-block-end: var(--size4);
  margin-block-start: var(--size4);
}

menu {
  padding-inline-start: 1.125em;
  margin-block-start: 0;
  margin-block-end: 0;
  line-height: 1;
  list-style-type: none;
}

menu a {
  display: inline-block;
  padding-top: var(--size2);
  padding-bottom: var(--size2);
}

.toc menu {
  list-style-type: decimal;
}

/* Root Navigation */
#root-header {
  box-sizing: border-box; /* count these 5 */
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--global-header-z-index);
  height: var(--global-header-size);
  padding: var(--size4);
  background-color: var(--neutral100);
  box-shadow: var(--shadow-down);
}

#root-title {
  margin: 0;
  font-size: var(--text-size-h6);
  line-height: 1;
}

.grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

main {
  position: relative;
  inset: var(--global-header-size) 0 0;
  margin: 0 var(--size4);
}

/* 9. A. Pagination */
.pagination {
  margin: var(--size4);
  font-size: var(--test-size-s);
}

/* .button-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.button {
  text-decoration: none;
  appearance: none;
  padding: 0.35em 0.5em 0.25em;

  &:not(:disabled) {
    cursor: pointer;
  }

  &.solid {
    color: #fff;
    background-color: #000;
  }

  &.outline {
    border: 1px solid #000;
  }

  &[aria-current="page"] {
    border-color: var(--link);
    color: var(--neutral100);
    background-color: var(--link);
  }
} */

/* 10. Trays */
.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: var(--text-size-h6);
  height: var(--text-size-h6);
  padding: 0;
  border: 0;
  margin: 0;
  cursor: pointer;

  &:hover:not(:disabled),
  &:focus:not(:disabled) {
    box-shadow: none;
  }

  & > .hamburger-line {
    height: 2px;
    background-color: var(--neutral00);
    transition: all 0.3s ease;
    pointer-events: none;
  }

  &[data-open] {
    & .hamburger-line:nth-child(1) {
      transform: translateY(6px) rotate(45deg);
    }

    & > .hamburger-line:nth-child(2) {
      opacity: 0;
    }

    & .hamburger-line:nth-child(3) {
      transform: translateY(-6px) rotate(-45deg);
    }
  }
}

.tray {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--global-header-size);
  z-index: calc(var(--global-header-z-index) - 1);
  width: 100%;
  padding-top: var(--size4);
  height: calc(100vh - var(--global-header-size));
  transition: transform 0.3s ease-in-out;
  background-color: var(--neutral100);
}

.right {
  left: 100%;

  &.open {
    transform: translateX(-100%);
  }
}

.left {
  left: -100%;

  &.open {
    transform: translateX(100%);
  }
}

/* Sidebar */
.layout-sidebar {
  & > .sidebar {
    margin-top: var(--size-xl);
  }
}

@media screen and (min-width: 900px) {
  .layout-sidebar {
    display: flex;
    gap: var(--size4);

    & > .main {
      margin-right: var(--size4);
    }

    & > .sidebar {
      box-sizing: border-box;
      position: sticky;
      top: var(--global-header-size);
      display: flex;
      flex-direction: column;
      height: calc(100vh - var(--global-header-size));
      min-width: var(--sidebar-width);
      padding: var(--size4) 0;
      margin-top: 0;

      /* & > header {} */

      & .sidebar-content {
        margin: var(--size4) 0;
        overflow-y: auto;
        flex-grow: 1;

        & > menu {
          padding-inline-start: 0;
        }
      }

      /* & > footer {} */
    }
  }
}
/**
 * More Things 
 *
 * Sidebars/Navigation
 * 1. Table of Contents
 * 2. Global Header
 * 3. Global Footer
 *
 * Tags: aside, footer, section>
 *
 * Components: Accordions, Popovers, Dialogs
*/

/* Add this to its own repo and start documentation link on jameskrayer.com */

/* 11. Animations */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}
