/* ===================================================================
   Direktor Pro · Humanized Git-Repo Stylesheet
   100% Mobile Optimized, Calm, Utilitarian & Responsive
   =================================================================== */

:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-page: #0d1117;
  --bg-card: #161b22;
  --bg-header: #010409;
  --bg-subtle: #21262d;
  --bg-hover: #30363d;
  --border-default: #21262d;
  --border-muted: #1b2028;
  --border-active: #388bfd;
  
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --text-link: #58a6ff;

  /* Scrabble Tile Warm Amber/Orange Accent */
  --brand-orange: #f0883e;
  --brand-orange-hover: #d97706;
  --brand-orange-subtle: rgba(240, 136, 62, 0.12);
  --brand-orange-border: rgba(240, 136, 62, 0.35);

  --accent-green: #238636;
  --accent-green-hover: #2ea043;
  --accent-green-text: #3fb950;
  
  /* Modern Developer Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
}

[data-theme="light"] {
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --bg-header: #f6f8fa;
  --bg-subtle: #f6f8fa;
  --bg-hover: #f3f4f6;
  --border-default: #d0d7de;
  --border-muted: #d8dee4;
  --border-active: #0969da;
  
  --text-primary: #1f2328;
  --text-secondary: #57606a;
  --text-muted: #6e7781;
  --text-link: #0969da;

  --brand-orange: #d97706;
  --brand-orange-hover: #b45309;
  --brand-orange-subtle: #fff8eb;
  --brand-orange-border: #fcd34d;

  --accent-green: #1f883d;
  --accent-green-hover: #1a7f37;
  --accent-green-text: #1a7f37;
}

/* Base & Mobile Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  width: 100%;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  text-decoration: underline;
}

code, pre {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

@media (min-width: 640px) {
  .container {
    padding: 0 20px;
  }
}

/* -------------------------------------------------------------------
   Logo Switching (Strictly No Background Boxes)
   ------------------------------------------------------------------- */
.logo-dark-only { display: block; }
.logo-light-only { display: none; }

[data-theme="light"] .logo-dark-only { display: none !important; }
[data-theme="light"] .logo-light-only { display: block !important; }
[data-theme="dark"] .logo-dark-only { display: block !important; }
[data-theme="dark"] .logo-light-only { display: none !important; }

/* -------------------------------------------------------------------
   Top Sticky Navigation Bar
   ------------------------------------------------------------------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-default);
  padding: 8px 0;
  backdrop-filter: blur(8px);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 1;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo {
  height: 24px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-divider {
  color: var(--text-muted);
  font-weight: 300;
  font-size: 15px;
  user-select: none;
}

.repo-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-name:hover {
  text-decoration: none;
  color: var(--text-link);
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 12px;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  white-space: nowrap;
}

.badge-public {
  background-color: transparent;
}

.badge-version {
  background-color: var(--brand-orange-subtle);
  border-color: var(--brand-orange-border);
  color: var(--brand-orange);
  font-family: var(--font-mono);
  font-weight: 600;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .nav-content {
    padding: 0 12px;
  }
  .nav-logo {
    height: 22px;
  }
  .nav-divider,
  .repo-name,
  .badge-public,
  .badge-version,
  .nav-download-btn {
    display: none !important;
  }
  #themeToggle {
    padding: 5px 8px;
    min-height: 28px;
  }
}

/* -------------------------------------------------------------------
   Buttons & Micro-Components
   ------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  min-height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background-color: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.btn:hover {
  background-color: var(--bg-hover);
  border-color: var(--text-secondary);
  text-decoration: none;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  min-height: 28px;
}

.btn-primary {
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background-color: var(--brand-orange-hover);
  border-color: var(--brand-orange-hover);
  color: #ffffff;
}

.btn-green {
  background-color: var(--accent-green);
  border-color: rgba(240, 246, 252, 0.1);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn-green:hover {
  background-color: var(--accent-green-hover);
  color: #ffffff;
}

.btn-subtle {
  background-color: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-subtle:hover {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
}

.btn-full {
  width: 100%;
}

.tag-meta {
  font-size: 10px;
  background: rgba(0, 0, 0, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* -------------------------------------------------------------------
   Repository Masthead
   ------------------------------------------------------------------- */
.repo-masthead {
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--border-default);
  padding-top: 20px;
}

.repo-meta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .repo-meta-row {
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 20px;
  }
}

@media (max-width: 767px) {
  .repo-masthead {
    padding-top: 14px;
  }
  .repo-crumbs {
    font-size: 16px;
    gap: 6px;
  }
  .repo-title {
    font-size: 16px;
  }
  .repo-desc {
    font-size: 13px;
    line-height: 1.5;
  }
  .repo-stats-block {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    width: auto;
  }
  .repo-stats-block .stat-pill {
    padding: 3px 10px;
    min-height: 28px;
    font-size: 12px;
  }
}

.repo-title-block {
  max-width: 820px;
}

.repo-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.org {
  color: var(--brand-orange);
  font-weight: 500;
}

.slash {
  color: var(--text-muted);
  font-weight: 300;
}

.repo-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: inline;
}

.repo-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.repo-stats-block {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  min-height: 28px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background-color: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.stat-pill:hover {
  background-color: var(--bg-hover);
}

.stat-pill.starred {
  border-color: rgba(227, 179, 65, 0.4);
  background-color: rgba(227, 179, 65, 0.1);
  color: #e3b341;
}

.stat-pill.starred .star-icon {
  fill: #e3b341;
  color: #e3b341;
}

.stat-pill.share-btn.copied {
  color: var(--accent-green-text);
  border-color: var(--accent-green);
  background-color: rgba(35, 134, 54, 0.1);
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 11px;
  background-color: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 10px;
  color: var(--text-secondary);
}

/* Touch-Optimized Horizontal Swipe Tabs */
.repo-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0;
  border-bottom: 1px solid var(--border-default);
}
.repo-tabs::-webkit-scrollbar {
  display: none;
}

.tab-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  min-height: 42px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
  margin-bottom: -1px;
}

.tab-item:hover {
  color: var(--text-primary);
  border-bottom-color: var(--border-default);
}

.tab-item.active {
  color: var(--text-primary);
  border-bottom-color: var(--brand-orange);
  font-weight: 600;
}

.badge-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 10px;
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
}

/* -------------------------------------------------------------------
   Main Grid Layout (Responsive)
   ------------------------------------------------------------------- */
.main-layout {
  padding-top: 20px;
  padding-bottom: 48px;
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

.repo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  width: 100%;
}

@media (min-width: 1024px) {
  .repo-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
  }
}

.repo-main-col {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.repo-sidebar {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

/* -------------------------------------------------------------------
   Git Action Bar
   ------------------------------------------------------------------- */
.git-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.action-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.branch-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background-color: var(--bg-card);
  color: var(--text-primary);
  flex-shrink: 0;
  min-height: 28px;
}

.branch-arrow {
  font-size: 11px;
  color: var(--text-muted);
}

.branch-meta-link {
  display: none;
}

.commit-summary {
  display: none;
}

@media (min-width: 768px) {
  .commit-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
}

.commit-icon {
  flex-shrink: 0;
}

.commit-msg {
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commit-author, .commit-time {
  color: var(--text-muted);
  flex-shrink: 0;
  display: inline;
}

.action-right {
  position: relative;
  flex-shrink: 0;
}

.dropdown-wrapper {
  position: relative;
}

#codeBtn {
  width: auto;
  min-height: 28px;
  height: 28px;
  font-size: 12px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  width: min(340px, calc(100vw - 32px));
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

@media (min-width: 768px) {
  .dropdown-menu {
    width: 360px;
    padding: 14px;
  }
}

.dropdown-menu.show {
  display: block;
}

/* GitHub Sub-Tabs */
.dropdown-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 12px;
  gap: 4px;
}

.dropdown-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  margin-bottom: -1px;
}

.dropdown-tab:hover {
  color: var(--text-primary);
}

.dropdown-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--brand-orange);
  font-weight: 600;
}

/* Dropdown Panels */
.dropdown-panel {
  display: none;
}

.dropdown-panel.active {
  display: block;
}

.dropdown-panel-lead {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 10px;
}

/* Download Card */
.dropdown-download-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  margin-bottom: 10px;
  transition: all 0.15s ease;
}

.dropdown-download-card:hover {
  background-color: var(--bg-hover);
  border-color: var(--brand-orange-border);
  text-decoration: none;
}

.dd-icon-box {
  color: var(--brand-orange);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dd-text-box {
  flex: 1 1 auto;
  min-width: 0;
}

.dd-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dd-subtitle {
  font-size: 10.5px;
  color: var(--text-secondary);
}

.dd-arrow {
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
}

/* Mini Steps in Dropdown */
.dropdown-mini-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  padding: 8px 10px;
  background-color: var(--bg-page);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-muted);
  margin-bottom: 10px;
}

.mini-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-num {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--border-default);
  color: var(--text-primary);
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-step code {
  font-family: var(--font-mono);
  font-size: 10px;
  background-color: var(--bg-subtle);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Terminal Tab Groups */
.dropdown-code-group {
  margin-bottom: 8px;
}

.code-group-label {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

/* Dropdown Reassurance Footer */
.dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-default);
  font-size: 11px;
  color: var(--text-muted);
}

.dropdown-footer-link {
  color: var(--text-link);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}
.dropdown-footer-link:hover {
  text-decoration: underline;
}

.code-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-page);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.code-copy-row code {
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}
.copy-btn:hover {
  color: var(--text-primary);
}
.copy-btn.copied {
  color: var(--accent-green-text);
}

/* -------------------------------------------------------------------
   File Explorer Table & GitHub File Viewer (Mobile Aligned)
   ------------------------------------------------------------------- */
.repo-breadcrumb-nav {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  font-family: var(--font-sans);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0;
  min-height: 28px;
}

.repo-breadcrumb-nav::-webkit-scrollbar {
  display: none;
}

.repo-breadcrumb-nav .branch-name {
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  flex-shrink: 0;
}

.repo-breadcrumb-nav .bc-sep {
  color: var(--text-muted);
  flex-shrink: 0;
}

.repo-breadcrumb-nav a {
  color: var(--text-link);
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}

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

.repo-breadcrumb-nav .bc-current {
  color: var(--text-primary);
  font-weight: 600;
  flex-shrink: 0;
}

.file-tree-box {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  margin-bottom: 20px;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.file-tree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-default);
  font-size: 12px;
  min-width: 0;
  gap: 8px;
}

.header-left {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  flex: 1 1 auto;
}

.commit-hash {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-link);
  margin-right: 6px;
  flex-shrink: 0;
}

.commit-text {
  color: var(--text-secondary);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.header-right {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  flex-shrink: 0;
}

.file-table {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-muted);
  font-size: 13px;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.1s ease;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.file-row.parent-row {
  background-color: var(--bg-subtle);
}

.file-commit {
  display: none; /* Hidden on mobile to prevent squishing */
}

@media (min-width: 640px) {
  .file-row {
    grid-template-columns: 240px 1fr 80px;
    padding: 9px 14px;
  }
  .file-commit {
    display: block;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
    font-size: 12px;
  }
}

.file-row:last-child {
  border-bottom: none;
}

.file-row:hover {
  background-color: var(--bg-hover);
}

.file-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
}

.file-name .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-icon {
  color: #79c0ff;
  flex-shrink: 0;
}

.file-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.file-age {
  color: var(--text-muted);
  text-align: right;
  font-size: 11.5px;
  font-family: var(--font-mono);
  flex-shrink: 0;
  margin-left: 8px;
}

/* -------------------------------------------------------------------
   GitHub File Viewer (Blob View)
   ------------------------------------------------------------------- */
.blob-viewer-box {
  display: none;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  margin-bottom: 24px;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.blob-viewer-box.active {
  display: block;
}

.blob-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 14px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-default);
}

@media (min-width: 640px) {
  .blob-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.blob-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

@media (min-width: 640px) {
  .blob-info {
    width: auto;
    justify-content: flex-start;
    gap: 10px;
  }
}

.blob-filename {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.blob-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.blob-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

@media (min-width: 640px) {
  .blob-actions {
    width: auto;
  }
}

.blob-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background-color: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  flex: 1 1 0;
  min-height: 34px;
}

@media (min-width: 640px) {
  .blob-btn {
    flex: initial;
    padding: 4px 10px;
    min-height: 28px;
    font-size: 12px;
  }
}

.blob-btn:hover {
  background-color: var(--bg-hover);
  border-color: var(--text-secondary);
  text-decoration: none;
}

.blob-btn.active {
  background-color: var(--brand-orange-subtle);
  border-color: var(--brand-orange-border);
  color: var(--brand-orange);
}

.blob-btn.copied {
  color: var(--accent-green-text);
  border-color: var(--accent-green);
}

.blob-body {
  position: relative;
  background-color: var(--bg-page);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 700px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.blob-code-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 19px;
}

@media (min-width: 640px) {
  .blob-code-table {
    font-size: 12px;
    line-height: 20px;
  }
}

.blob-code-table td {
  padding: 0;
  vertical-align: top;
}

.blob-num {
  width: 36px;
  min-width: 36px;
  padding: 0 6px;
  text-align: right;
  color: var(--text-muted);
  user-select: none;
  border-right: 1px solid var(--border-muted);
  background-color: var(--bg-subtle);
  font-size: 10.5px;
}

@media (min-width: 640px) {
  .blob-num {
    width: 48px;
    min-width: 48px;
    padding: 0 10px;
    font-size: 11.5px;
  }
}

.blob-code {
  padding: 0 10px;
  white-space: pre;
  color: var(--text-primary);
  tab-size: 4;
}

@media (min-width: 640px) {
  .blob-code {
    padding: 0 14px;
  }
}

/* Syntax Highlighting */
.syn-keyword { color: #ff7b72; font-weight: 600; }
[data-theme="light"] .syn-keyword { color: #cf222e; }

.syn-string { color: #a5d6ff; }
[data-theme="light"] .syn-string { color: #0a3069; }

.syn-comment { color: #8b949e; font-style: italic; }
[data-theme="light"] .syn-comment { color: #6e7781; }

.syn-variable { color: #79c0ff; }
[data-theme="light"] .syn-variable { color: #0550ae; }

.syn-title { color: #d2a8ff; font-weight: 600; }
[data-theme="light"] .syn-title { color: #8250df; }

.syn-number { color: #f0883e; }
[data-theme="light"] .syn-number { color: #953800; }

/* Raw Textarea fallback */
.blob-raw-textarea {
  display: none;
  width: 100%;
  min-height: 400px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 20px;
  background-color: var(--bg-page);
  color: var(--text-primary);
  border: none;
  resize: vertical;
  outline: none;
}

.blob-raw-textarea.show {
  display: block;
}

/* -------------------------------------------------------------------
   Rendered README Box (Warm, Clean & Readable)
   ------------------------------------------------------------------- */
.readme-box {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  overflow: hidden;
}

.readme-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-default);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.readme-body {
  padding: 16px 14px;
}

@media (min-width: 640px) {
  .readme-body {
    padding: 32px 32px;
  }
}

.hero-header {
  margin-bottom: 20px;
}

.hero-logo-frame {
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.hero-logo {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
}

@media (min-width: 640px) {
  .hero-logo {
    height: 44px;
  }
}

.hero-heading {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 10px;
}

@media (min-width: 640px) {
  .hero-heading {
    font-size: 24px;
  }
}

.hero-tagline {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 740px;
  margin-bottom: 18px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}

.tag-orange {
  background-color: var(--brand-orange-subtle);
  border-color: var(--brand-orange-border);
  color: var(--brand-orange);
  font-weight: 600;
}

.doc-divider {
  border: 0;
  height: 1px;
  background-color: var(--border-default);
  margin: 28px 0;
}

.doc-section {
  margin-bottom: 28px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Superpowers Grid (Mobile Stacked, Desktop 2x2) */
.superpowers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .superpowers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

.superpower-card {
  padding: 16px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}

.card-icon-frame {
  color: var(--brand-orange);
  font-size: 20px;
  margin-bottom: 8px;
}

.superpower-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.superpower-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 3-Step Walkthrough */
.steps-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-default);
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--brand-orange);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.step-content p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* FAQ List */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  padding: 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-default);
}

.faq-item h4 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* -------------------------------------------------------------------
   Sidebar Cards
   ------------------------------------------------------------------- */
.repo-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.sidebar-link-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  margin-top: 4px;
}

.accent-link {
  color: var(--text-link);
  word-break: break-all;
}

.sidebar-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.topic-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-link);
  font-weight: 500;
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-default);
}

.sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-latest {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-green-text);
  background-color: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.3);
  padding: 1px 6px;
  border-radius: 10px;
}

.release-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.release-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.release-ver {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-primary);
}

.release-date {
  font-size: 11px;
  color: var(--text-muted);
}

.release-bullets {
  list-style: square;
  padding-left: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.meta-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meta-label {
  color: var(--text-muted);
}

.meta-val {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* -------------------------------------------------------------------
   Tab Panels: How It Works, Releases, Terminal Reference
   ------------------------------------------------------------------- */
.panel-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px 16px;
}

@media (min-width: 640px) {
  .panel-card {
    padding: 24px;
  }
}

.panel-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-card .subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 20px;
}

/* Dual Mockup Grid */
.dual-mockup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .dual-mockup-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mockup-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.mockup-body {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background-color: #090d14;
  color: #e6edf3;
  padding: 14px;
  font-family: var(--font-mono);
}
.mockup-body .text-emerald-400 { color: #3fb950; }
.mockup-body .text-amber-400 { color: #d29922; }

.phone-preview .phone-bar {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 10px;
}

.matchup-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background-color: #121824;
  border: 1px solid var(--border-default);
}

.player-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.player-side .p-name { font-size: 12px; color: #ffffff; font-weight: 600; }
.player-side .p-score { font-size: 14px; color: var(--brand-orange); font-weight: 700; }

.vs-divider {
  font-size: 11px;
  color: var(--text-muted);
}

.mockup-action-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px;
  border-radius: var(--radius-sm);
  background-color: rgba(63, 185, 80, 0.15);
  color: #3fb950;
  font-size: 11px;
  font-weight: 600;
}

.laptop-preview .laptop-status-bar {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 8px;
}

.laptop-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.t-row {
  display: grid;
  grid-template-columns: 36px 1fr 110px;
  padding: 4px 6px;
  border-radius: 2px;
}
.t-header { color: var(--text-muted); border-bottom: 1px solid var(--border-default); }

.mockup-caption {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Releases Tab */
.release-full-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .release-full-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.release-meta-row-clean {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.release-meta-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.release-time {
  font-size: 11.5px;
  color: var(--text-muted);
}

.release-notes-body h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 16px 0 8px 0;
}

.release-notes-body ul {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.asset-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.asset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}

.asset-row:hover {
  background-color: var(--bg-hover);
  text-decoration: none;
}

.asset-size {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 11px;
}

/* Table Responsive Wrapper */
.table-responsive-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.cmd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 500px;
}

.cmd-table th, .cmd-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-default);
  text-align: left;
}

.cmd-table th {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 600;
}

.cmd-table td code {
  color: var(--brand-orange);
  background-color: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
}

/* -------------------------------------------------------------------
   Site Footer (Mobile Aligned)
   ------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-default);
  background-color: var(--bg-header);
  padding: 20px 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--text-secondary);
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  height: 20px;
  width: auto;
  display: block;
  object-fit: contain;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* Floating Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #1f2328;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
  text-align: center;
}

[data-theme="light"] .toast-notification {
  background-color: #1f2328;
  color: #ffffff;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
