:root {
  --font-size: calc(18px + 0.390625vw);
  --sans-serif: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;

  --color: #373020;
  --outline: #ddd8cc;
  --background: #fffcf5;
  --background-secondary: #f5f2e8;
  --bg-overlay: rgb(0 0 0 / 35%);
}

:root.dark {
  --color: #b98605;
  --outline: #29210e;
  --background: #030200;
  --background-secondary: #15130f;
  --bg-overlay: rgb(0 0 0 / 60%);
}

@media (prefers-color-scheme: light) {
  :root {
    --color: #373020;
    --outline: #d0d0d4;
    --background: #fffcf5;
    --background-secondary: #f6f6f7;
    --bg-overlay: rgb(0 0 0 / 35%);
  }
}

*,
*::before,
*::after {
  transition-property: color, background, border, outline;
  transition-delay: 0s;
  transition-duration: 0.2s;
  transition-timing-function: ease-out;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

html {
  font-size: var(--font-size);
  scroll-behavior: smooth;
  -webkit-font-smoothing: subpixel-antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--serif);
  font-weight: normal;
  font-size: 1rem;
  line-height: 1.62;
  color: var(--color);
  background: var(--background);
  position: relative;
  transition: all .2s ease-out;
}

.site-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .25rem;
  font-size: 0.825rem;
}

.header-utilities {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: .5rem;
}

.header-utilities-right {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: .5rem;
}

.site-header :where(button, a) {
  border-radius: 8px;
}

label {
  cursor: pointer;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.toggle-language {
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--sans-serif);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 14px;
}

main {
  padding: max(1rem, 3vw) 4vw 8vw;
  margin: 0 auto;
  max-width: 45rem;
}

.site-nav {
  margin: 0;
  font-size: 0.825rem;
  text-align: left;
}

.site-nav a {
  padding: 0.15rem 0.5rem;
  display: inline-block;
  text-decoration: none;
}

.site-nav a[aria-current],
.site-nav a:hover {
  text-decoration: underline;
  text-underline-position: from-font;
  text-decoration-thickness: from-font;
}

.site-nav:has(:focus) a[aria-current]:not(:focus),
.site-nav:has(:hover) a[aria-current]:not(:hover) {
  text-decoration: none;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  justify-content: center;
  align-items: center;
  border: 1px solid transparent;
}

.menu-toggle svg {
  display: block;
}

.site-nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

@media (max-width: 600px) {
  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(18rem, 82vw);
    margin: 0;
    padding: 1rem 0.75rem;
    text-align: left;
    background: var(--background-secondary);
    border-right: 1px solid var(--outline);
    transform: translateX(-110%);
    transition: transform 0.2s ease-out;
    overflow: auto;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: .5rem;
  }

  .site-nav a {
    display: block;
    padding: 0.35rem 0.5rem;
    font-size: 1rem;
    text-decoration: none !important;
  }

  .site-nav a[aria-current] {
    background: var(--background);
    border-radius: 4px;
    border: 1px solid var(--outline);
  }

  :root.menu-open .site-nav {
    transform: translateX(0);
  }

  :root.menu-open .site-nav-overlay {
    opacity: 1;
    pointer-events: auto;
    z-index: 9;
  }
}

h1 {
  text-align: center;
  font-size: 1.6em;
  line-height: normal;
  font-weight: normal;
  margin-bottom: max(2.5rem, 4vw);
}

h2, h3, h4, h5, h6 {
  opacity: 0.6;
}

h2 {
  font-size: 1.6em;
  font-weight: normal;
  font-weight: normal;
  margin-top: 1.5em;
}

p {
  white-space: pre-wrap;
  margin: 1.5em 0;
}

a, a:visited {
  color: var(--color);
  text-decoration: underline;
}

:focus-visible {
  outline: 1px solid var(--color);
  border-radius: 8px;
}

select,
option {
  color: var(--color);
  background: var(--background);
  font-family: var(--serif);
  font-weight: normal;
  font-size: 1em;
  line-height: 1.62;
  text-align: left;
}

button {
  border: none;
  background: none;
  font-family: var(--serif);
  font-weight: normal;
  font-size: 1em;
  line-height: 1.62;
  color: var(--color);
  min-width: 44px;
  min-height: 44px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
}

select {
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid;
}

.back-to-top {
  position: absolute;
  top: 120vh;
  bottom: 4vh;
  right: 4vw;
}

.back-to-top a {
  background: var(--background);
  color: var(--color);
  border: 1px solid;
  position: sticky;
  top: 90vh;
  display: flex;
  width: 44px;
  height: 44px;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  opacity: .5;
  transition: opacity .2 ease-out;
}

.back-to-top a:active {
  opacity: 1;
}

.back-to-top svg {
  margin-top: -3px;
}

ul {
  margin-left: 1.5em;
}

ul li {
  margin-bottom: 1em;
  line-height: 1.62;
  list-style: disc;
}

iframe {
  margin: 3em auto;
  display: block;
}

.iframe header {
  display: none
}

table {
  font-family: var(--sans-serif);
  font-style: normal;
  font-weight: 400;
  font-size: .75em;
  line-height: 1.3;

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

th {
  font-weight: 700;
  text-align: center;
}

td, th {
  padding: .75em;
  border-bottom: 1px solid rgba(115, 135, 144, 0.25);
}

tr:last-child td {
  border-bottom: none;
}

/* Responsive styling for mobile screens */
@media (max-width: 600px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  /* Hide the table headers */
  thead tr {
    display: none;
  }

  /* Display each cell in a stacked format */
  td {
    position: relative;
    padding-left: 50%;
  }

  /* Add labels before each cell */
  td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 45%;
    padding-left: 15px;
    font-weight: bold;
    white-space: nowrap;
  }
}

.text-left {
  text-align: left;
}

.badge {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0.5px 10px 1.5px;
  gap: 4px;
  border-radius: 1000px;
  font-family: var(--sans-serif);
  font-weight: 500;
  font-size: 0.675rem;
  line-height: 1.5;
  color: #000000;
}

.badge-warning {
  background: linear-gradient(160.89deg, #FFDE7E 4.54%, #E0B22E 87.13%);
  border: 2px solid #DDAC1F;
}

.badge-danger {
  background: linear-gradient(147.63deg, #FEA768 5.44%, #FD4062 80.6%);
  border: 2px solid #EE3C49;
}

.badge-info {
  background: linear-gradient(137deg, #62CBFC 9.1%, #1CA0DE 78.82%);
  border: 2px solid #158DC4;
}

.badge-success {
  background: linear-gradient(341.53deg, #14AE5C 18.23%, #B5F8D4 117.32%);
  border: 2px solid #18A158;
}

.badge-light {
  background: linear-gradient(141.55deg, #FFEFFD 4.88%, #FFBCFE 51.35%, #F4CBFF 57.69%, #E1BCFF 82.19%, #DABDFF 89.38%);
  border: 2px solid #C89EFF;
}

.card {
  max-width: 720px;
  margin: 2rem;
  padding: min(5vw, 1.5rem);
  background: var(--background-secondary);
  border: 1px solid var(--outline);
  border-radius: 12px;
}

.note {
  margin: 1.5rem 0;
  padding: .95rem min(5vw, 1.5rem);
  font-size: .95rem;
  background: var(--background-secondary);
  border: 1px solid var(--outline);
  border-radius: 12px;
}

.note-title {
  font-family: var(--sans-serif);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .075em;
  opacity: .55;
}

.note summary.note-title {
  padding: .95rem min(5vw, 1.5rem) !important;
  margin: -.95rem calc(min(5vw, 1.5rem) * -1) !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 0;
  border-radius: 12px;
}

.note summary.note-title::-webkit-details-marker {
  display: none;
}

.note summary.note-title::marker {
  content: "";
}

.note > summary.note-title::before {
  content: "";
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 1.1em;
  opacity: 1;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  transform: rotate(0deg);
  transition: transform 0.2s ease-out;
}

.note[open] > summary.note-title::before {
  transform: rotate(90deg);
}

.note * {
  margin-top: .95rem;
  margin-bottom: .95rem;
}

.note :first-child {
  margin-top: 0;
}

.note :last-child {
  margin-bottom: 0;
}
