/* Prevent scrollbar jitter between pages */
html {
  /* Modern approach - reserves space for scrollbar */
  scrollbar-gutter: stable;
  /* Fallback for older browsers - force scrollbar to always be visible */
  overflow-y: scroll;
}

/* Code Block Styling */
pre {
  position: relative;
  background-color: #f6f8fa !important;
  border: 1px solid #d0d7de !important;
  border-radius: 6px !important;
  padding: 16px !important;
  margin: 16px 0 !important;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  box-shadow: none !important;
}

pre code {
  color: #24292f !important;
  background: none !important;
  padding: 0 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  text-shadow: none !important;
}

/* Copy Button Styling */
.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  background-color: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  font-size: 12px;
  color: #24292f;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.copy-button:hover {
  background-color: #f3f4f6;
  border-color: #d0d7de;
}

pre:hover .copy-button {
  opacity: 1;
}

/* Syntax Highlighting - GitHub Light Theme */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #6e7781;
}

.token.punctuation {
  color: #24292f;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
  color: #0550ae;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin {
  color: #116329;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #116329;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #cf222e;
}

.token.function {
  color: #8250df;
}

.token.regex,
.token.important,
.token.variable {
  color: #116329;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

/* Inline code styles */
.inline-code {
  background-color: #f4f4f4;
  padding: 0.125rem 0.25rem;
  border-radius: 0.125rem;
  font-size: 0.875rem;
  font-family: Monaco, Menlo, "Ubuntu Mono", monospace;
}

/* Tag Pill Enhancement */
.tag-pill {
  text-decoration: none !important;
  display: inline-block;
  font-weight: 500;
  letter-spacing: 0.025em;
  text-transform: lowercase;
  transition: all 0.2s ease-in-out !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tag-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none !important;
}

/* Tags Container */
.tags {
  margin-top: 1rem;
}

.tags .f6 {
  font-weight: 500;
}

/* Random Logo Font Utilities */
.font-comic { font-family: 'Comic Sans MS', cursive; }
.font-blackletter { font-family: 'Lucida Blackletter', serif; }
.font-times { font-family: 'Times New Roman', serif; font-size: 1.1em; }

.font-galapagos { font-family: 'ABC Galapagos AB Grid Unlicensed Trial', sans-serif; }
.font-inter { font-family: 'Inter', 'InterVariable', sans-serif; }

/* Inter font feature settings for optimal rendering */
.font-inter {
    font-feature-settings: 'liga' 1, 'calt' 1;
    font-optical-sizing: auto;
}

/* Support for InterVariable with font-variation-settings */
@supports (font-variation-settings: normal) {
    .font-inter {
        font-family: 'InterVariable', 'Inter', sans-serif;
        font-variation-settings: 'wght' 400;
    }
}