
/* Quick Jumps/TOC navigation */
.quick-jumps {
  margin: 1.5em 0 2em 0;
  padding: 0.75em 1.2em;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 1rem;
  box-shadow: 0 1px 2px rgba(27,31,35,0.03);
}
.quick-jumps-label {
  font-weight: 600;
  font-size: 1.05em;
  margin-right: 0.7em;
}
.quick-jumps-list {
  list-style: none;
  margin: 0.5em 0 0 0;
  padding: 0;
}
.quick-jumps-list li {
  margin: 0.15em 0;
  padding: 0;
  font-size: 0.98em;
}
.quick-jumps-list a {
  color: #0969da;
  text-decoration: none;
  border-radius: 3px;
  padding: 2px 6px;
  transition: background 0.15s;
}
.quick-jumps-list a:hover,
.quick-jumps-list a:focus {
  background: #eaeef2;
  text-decoration: underline;
  outline: none;
}
@media (prefers-color-scheme: dark) {
  .quick-jumps { background: #161b22; border-color: #30363d; }
  .quick-jumps-list a { color: #58a6ff; }
  .quick-jumps-list a:hover, .quick-jumps-list a:focus { background: #1c2128; }
}
@media (prefers-contrast: high) {
  .quick-jumps { background: #000000; border-color: #ffffff; color: #ffffff; }
  .quick-jumps-list a { color: #6db3f2; }
}

/* Site header with search */
.site-header {
  border-bottom: 1px solid var(--borderColor-default, #d0d7de);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.6rem 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.breadcrumb {
  font-size: 0.875rem;
  color: #57606a;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb a {
  color: #0969da;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Header actions: wiki link + search form */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #24292f;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.wiki-link:hover {
  background: #eaeef2;
  border-color: #bec5cc;
  text-decoration: none;
}

@media (max-width: 767px) {
  .wiki-link span { display: none; }
}

@media (prefers-color-scheme: dark) {
  .wiki-link { color: #e6edf3; background: #161b22; border-color: #30363d; }
  .wiki-link:hover { background: #1c2128; border-color: #3d444d; }
}

@media (prefers-contrast: high) {
  .wiki-link { color: #ffffff; background: #000000; border-color: #ffffff; }
}


.search-form {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.search-input {
  padding: 0.35rem 0.65rem;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 0.875rem;
  width: 200px;
  background: #f6f8fa;
  color: #24292f;
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s, width 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9,105,218,0.3);
  width: 260px;
  background: #ffffff;
}

.search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  cursor: pointer;
  color: #57606a;
  transition: background 0.15s, border-color 0.15s;
}

.search-button:hover {
  background: #eaeef2;
  border-color: #bec5cc;
}

@media (max-width: 767px) {
  .site-header-inner { padding: 0.5rem 15px; }
  .search-input { width: 130px; }
  .search-input:focus { width: 160px; }
}

@media (prefers-color-scheme: dark) {
  .site-header { background: #0d1117; border-bottom-color: #30363d; }
  .search-input { background: #161b22; border-color: #30363d; color: #e6edf3; }
  .search-input:focus { border-color: #58a6ff; box-shadow: 0 0 0 3px rgba(88,166,255,0.3); background: #0d1117; }
  .search-button { background: #161b22; border-color: #30363d; color: #9ca3af; }
  .search-button:hover { background: #1c2128; border-color: #3d444d; }
}

@media (prefers-contrast: high) {
  .search-input { border-color: #ffffff; background: #000000; color: #ffffff; }
  .search-input:focus { box-shadow: 0 0 0 3px #ffffff; }
  .search-button { border-color: #ffffff; background: #000000; color: #ffffff; }
}



body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background-color: #ffffff;
  color: #24292f;
}

.guided-sidebar {
  position: sticky;
  top: 5.25rem;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.9rem;
  max-height: calc(100vh - 6.5rem);
  overflow: auto;
}

.guided-title {
  margin: 0;
  font-size: 1rem;
}

.guided-intro {
  margin: 0.4rem 0 0.9rem;
  color: #57606a;
  font-size: 0.86rem;
  line-height: 1.45;
}

.guided-progress {
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.55rem 0.65rem;
  margin: 0 0 0.8rem;
}

.guided-progress h3 {
  margin: 0;
  font-size: 0.84rem;
}

.guided-progress-copy {
  margin: 0.35rem 0 0.5rem;
  color: #57606a;
  font-size: 0.78rem;
}

.guided-progress-track {
  width: 100%;
  height: 0.45rem;
  border-radius: 999px;
  background: #eaeef2;
  overflow: hidden;
}

.guided-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1f8f63, #2da44e);
}

.guided-progress-percent {
  margin: 0.35rem 0 0;
  font-size: 0.74rem;
  color: #57606a;
}

.guided-resume {
  margin: 0 0 0.9rem;
}

.guided-resume-link {
  display: inline-block;
  font-size: 0.82rem;
  text-decoration: none;
  color: #0550ae;
  padding: 0.2rem 0;
}

.guided-resume-link:hover {
  text-decoration: underline;
}

.guided-section {
  margin-bottom: 0.85rem;
}

.guided-section h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.guided-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guided-nav li {
  margin: 0.1rem 0;
}

.guided-nav a {
  display: inline-block;
  text-decoration: none;
  color: #0b4fa2;
  font-size: 0.84rem;
  line-height: 1.35;
  padding: 0.12rem 0;
}

.guided-nav a:hover {
  text-decoration: underline;
}

.guided-active {
  font-weight: 700;
  color: #0550ae;
}

.guided-external {
  color: #57606a;
  font-size: 0.78rem;
}

.guided-empty {
  color: #57606a;
  font-size: 0.82rem;
}

.guided-sidebar details {
  border: none;
  margin: 0.1rem 0;
  padding: 0;
}

.guided-sidebar summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3d4c63;
  list-style: none;
  padding: 0.1rem 0;
}

.guided-sidebar summary::-webkit-details-marker {
  display: none;
}

.guided-sidebar summary::before {
  content: '▶ ';
  font-size: 0.7em;
}

.guided-sidebar details[open] > summary::before {
  content: '▼ ';
}

.quick-jumps {
  margin: 0 0 1rem;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  background: #f6f8fa;
  padding: 0.7rem 0.85rem;
}

.quick-jumps-title {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  border: none;
  padding: 0;
}

.quick-jumps-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.3rem 0.8rem;
}

.quick-jumps-list li {
  margin: 0;
}

.quick-jumps-list a {
  color: #0550ae;
  text-decoration: none;
  font-size: 0.85rem;
}

.quick-jumps-list a:hover {
  text-decoration: underline;
}

.progression-nav {
  margin-top: 2.2rem;
  padding-top: 1rem;
  border-top: 1px solid #d0d7de;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.progression-link {
  display: block;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.6rem 0.75rem;
  text-decoration: none;
  min-height: 3.6rem;
}

.progression-link:hover {
  border-color: #8c959f;
  background: #f6f8fa;
}

.progression-label {
  display: block;
  font-size: 0.74rem;
  color: #57606a;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.progression-title {
  display: block;
  color: #0550ae;
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 600;
}

.progression-disabled {
  opacity: 0.62;
  pointer-events: none;
}

.companion-media {
  margin: 0 0 1.2rem;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.8rem 0.9rem;
}

.companion-title {
  margin: 0;
  font-size: 1rem;
  border: none;
  padding: 0;
}

.companion-intro {
  margin: 0.35rem 0 0.7rem;
  font-size: 0.86rem;
  color: #57606a;
}

.companion-card {
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.7rem;
  margin: 0.65rem 0 0;
}

.companion-card h3 {
  margin: 0;
  font-size: 0.95rem;
  border: none;
  padding: 0;
}

.companion-note {
  margin: 0.35rem 0 0.5rem;
  color: #57606a;
  font-size: 0.82rem;
}

.companion-player {
  width: 100%;
  margin: 0.2rem 0 0.35rem;
}

.companion-links {
  margin: 0;
  font-size: 0.82rem;
}

.companion-links a {
  text-decoration: none;
}

.companion-links a:hover {
  text-decoration: underline;
}

.companion-preview {
  margin: 0.55rem 0 0;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
}

.companion-preview summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}

.companion-preview p {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
}

.onpage-nav {
  margin: 0 0 1.3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #f8fafc;
}

.onpage-title {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  border: none;
  padding: 0;
}

.onpage-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.onpage-item {
  margin: 0.12rem 0;
}

.onpage-item a {
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.35;
}

.onpage-item a:hover {
  text-decoration: underline;
}

.onpage-sub {
  margin-left: 0.9rem;
}

@media (max-width: 980px) {
  .guided-sidebar {
    position: static;
    max-height: none;
  }

  .progression-nav {
    grid-template-columns: 1fr;
  }
}

/* Improve focus visibility for keyboard navigation */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0969da;
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0969da;
  color: #ffffff;
  padding: 8px 16px;
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  body {
    background-color: #000000;
    color: #ffffff;
  }
  .markdown-body {
    color: #ffffff;
  }
  .markdown-body a {
    color: #6db3f2;
    text-decoration: underline;
  }
  .markdown-body blockquote {
    border-left-color: #ffffff;
    color: #ffffff;
  }
  .markdown-body table,
  .markdown-body table th,
  .markdown-body table td {
    border-color: #ffffff;
  }
  .markdown-body table th {
    background-color: #1a1a1a;
  }
  .markdown-body code,
  .markdown-body pre {
    background-color: #1a1a1a;
    border-color: #ffffff;
  }
  .markdown-body hr {
    background-color: #ffffff;
  }
  .site-footer {
    border-color: #ffffff;
    color: #ffffff;
  }
  .site-footer a {
    color: #6db3f2;
  }
  .skip-link {
    background: #ffffff;
    color: #000000;
  }
  a:focus-visible,
  button:focus-visible,
  summary:focus-visible {
    outline-color: #ffffff;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #0d1117;
    color: #e6edf3;
  }

  .guided-sidebar {
    background: #111827;
    border-color: #2e3744;
  }

  .guided-progress,
  .onpage-nav,
  .companion-media,
  .quick-jumps {
    background: #111827;
    border-color: #2e3744;
  }

  .companion-card,
  .companion-preview {
    background: #111827;
    border-color: #2e3744;
  }

  .guided-intro,
  .guided-empty,
  .guided-external,
  .guided-sidebar summary,
  .guided-progress-copy,
  .guided-progress-percent,
  .companion-intro,
  .companion-note {
    color: #9ca3af;
  }

  .guided-nav a {
    color: #8ec5ff;
  }

  .guided-active {
    color: #d2e7ff;
  }

  .guided-progress-track {
    background: #233146;
  }

  .guided-progress-fill {
    background: linear-gradient(90deg, #2ea66a, #4bc571);
  }

  .guided-resume-link,
  .onpage-item a,
  .onpage-title,
  .quick-jumps-title,
  .quick-jumps-list a,
  .companion-title,
  .companion-card h3,
  .companion-links a,
  .companion-preview summary,
  .companion-preview p {
    color: #d2e7ff;
  }

  .progression-nav {
    border-top-color: #2e3744;
  }

  .progression-link {
    border-color: #2e3744;
    background: #111827;
  }

  .progression-link:hover {
    border-color: #465368;
    background: #172134;
  }

  .progression-label {
    color: #9ca3af;
  }

  .progression-title {
    color: #d2e7ff;
  }

  .markdown-body {
    color: #e6edf3;
  }
  .site-footer {
    border-color: #30363d;
    color: #9ca3af;
  }
  .site-footer a {
    color: #58a6ff;
  }
  a:focus-visible,
  button:focus-visible,
  summary:focus-visible {
    outline-color: #58a6ff;
  }
  .skip-link {
    background: #58a6ff;
    color: #0d1117;
  }
  .skip-link:focus {
    outline-color: #e6edf3;
  }
}

/* Ensure tables are responsive */
.markdown-body table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  white-space: normal;
}

/* details/summary styling for collapsible blocks */
.markdown-body details {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  margin: 0.75rem 0;
}

.markdown-body details[open] {
  padding-bottom: 0.75rem;
}

.markdown-body summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.25rem 0;
  user-select: none;
  list-style: none;
}

.markdown-body summary::-webkit-details-marker {
  display: none;
}

.markdown-body summary::before {
  content: '▶ ';
  font-size: 0.75em;
  vertical-align: middle;
}

.markdown-body details[open] > summary::before {
  content: '▼ ';
}

/* Site footer */
.site-footer {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  border-top: 1px solid var(--borderColor-default, #d0d7de);
  color: #57606a;
  font-size: 0.875rem;
}

.site-footer a {
  color: #0969da;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print styles */
@media print {
  .guided-sidebar,
  .breadcrumb,
  footer,
  .skip-link {
    display: none;
  }
  .markdown-body details {
    border: none;
    padding: 0;
  }
  .markdown-body details > * {
    display: block;
  }
  .markdown-body summary::before {
    display: none;
  }
}
