/* Reset the footnote counter at the start of the body */
body {
    counter-reset: footnote;
}

/* Targeting only the footnote markers */
.footnote-ref sup {
    visibility: hidden; /* Hide the original number */
    position: relative;
}

.footnote-ref sup::before {
    content: counter(footnote, lower-alpha) " "; /* Convert footnote markers to letters */
    counter-increment: footnote; /* Only increment the footnote counter here */
    visibility: visible;
    position: absolute;
    left: 0;
    top: 0;
}

/* Targeting the footnotes in the margin */
li[id^="fn"] sup {
    visibility: hidden; /* Hide the original number */
    position: relative;
}

li[id^="fn"] sup::before {
    content: counter(footnote, lower-alpha) " "; /* Use the same counter value, no increment */
    visibility: visible;
    position: absolute;
    left: 0;
    top: 0;
}

.citation-box {
  background-color: #f9f9f9;
  border-left: 4px solid #999;
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  font-family: inherit;
  position: relative;
  margin-top: 1rem;
  color: #333;
}

.citation-text {
  display: block;
  margin-right: 2rem;
  white-space: pre-wrap;
  font-family: inherit;
  color: inherit;
}

.copy-icon-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.copy-icon-btn:hover {
  opacity: 0.7;
}

.copy-confirmation {
  position: absolute;
  top: 12px;
  right: 40px;
  background: #eee;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}

.floating-info-bar {
  position: fixed;
  z-index: 1000;
  display: flex;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  gap: 0.75rem;
  border: 1px solid #ccc;
}

/* Desktop: Vertical on right side */
@media screen and (min-width: 768px) {
  .floating-info-bar {
    flex-direction: column;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    border-left: 1px solid #ccc;
    border-bottom: none;
  }
}

/* Mobile: Horizontal at top */
@media screen and (max-width: 767px) {
  .floating-info-bar {
    flex-direction: row;
    top: 0;
    left: 0;
    right: 0;
    justify-content: center;
    border-bottom: 1px solid #ccc;
    border-left: none;
  }
}

.floating-info-bar button,
.floating-info-bar a {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.floating-info-bar button:hover,
.floating-info-bar a:hover {
  transform: scale(1.15);
}


/* Base style (wide screen, vertical float near content) */
.tool-panel {
  position: fixed;
  top: 160px; /* Adjust if needed */
  left: 50%;
  transform: translateX(520px); /* Adjust offset based on main content width */
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
}

.tool-panel a {
  margin: 0.4rem 0;
  font-size: 1.4rem;
  text-decoration: none;
  color: #333;
}

/* Mobile: switch to horizontal sticky bar at top */
@media (max-width: 767px) {
  .tool-panel {
    position: sticky;
    top: 0;
    left: 0;
    transform: none;
    flex-direction: row;
    justify-content: center;
    gap: 1.2rem;
    width: 100%;
    border: none;
    border-bottom: 1px solid #ccc;
    border-radius: 0;
    padding: 0.6rem;
  }

  .tool-panel a {
    margin: 0;
    font-size: 1.5rem;
  }
}


/* Mobile styles for screens narrower than 1000px */
@media only screen and (max-width: 1200px) {
  
  /* Adjust heading size and spacing */
  h1.title,
  h1 {
    font-size: 2.0rem !important;
    line-height: 2.2rem !important;
    text-align: left;
    word-break: break-word;
  }

  /* Improve paragraph wrappinhttps://s7d1.scene7.com/is/image/hyundai/2026-ioniq-9-limited-abyss-black-pearl?fmt=webpg */
  p {
    text-align: left;
    hyphens: auto;
  }
}

.article-label {
  display: block;
  font-size: 0.9rem;
  font-weight: bold;
  color: #4F708F; /* Custom blue or your chosen color */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  margin-top: 1rem;
}


/* Hide article-label when shown inside listing cards */
.quarto-grid-item .article-label,
.listing .article-label {
  display: none !important;
}




/* Left-aligned sticky TOC for article layout */
.quarto-sidebar-toc {
  max-width: 260px;
  position: sticky;
  top: 6rem; /* Adjust if navbar height changes */
  height: calc(100vh - 6rem);
  overflow-y: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
  background: transparent;
  border-right: 1px solid #eee;
}

body.toc-left .page-columns {
  grid-template-columns: auto minmax(0, 1fr);
}

/* Optional: hide TOC on mobile */
@media (max-width: 991px) {
  .quarto-sidebar-toc {
    display: none;
  }
}

/* Left TOC positioning */
.toc-left {
  grid-column: page-left;
  position: sticky;
  top: 6rem;
  align-self: start;
  font-size: 0.9rem;
  line-height: 1.4;
  padding-right: 1rem;
}


/* Optional: hide the default Quarto margin TOC if it appears */
body.no-toc #quarto-margin-sidebar {
  display: none !important;
}

