.v2-repo-panel {
  min-height: 100%;
}

.v2-repo-shell {
  max-width: 1320px;
  margin: 0 auto;
}

.v2-repo-shell--header {
  padding: 0 3rem 1.15rem;
}

.v2-repo-shell--canvas {
  padding: .35rem 3rem 2.2rem;
}

.v2-repo-header {
  background: transparent;
  border-bottom: 0;
}

.v2-repo-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.v2-repo-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  flex-wrap: wrap;
}

.v2-repo-header-actions .dropdown {
  display: inline-flex;
}

.v2-repo-header-actions .btn {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v2-repo-header-intro {
  flex: 1 1 52rem;
  min-width: 0;
  display: grid;
  gap: .4rem;
}

.v2-repo-header-below {
  margin-top: 1.3rem;
}

.v2-repo-kind {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5a697f;
}

.v2-repo-title {
  margin: 0;
  font-size: clamp(1.85rem, 2.35vw, 2.55rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  max-width: min(68rem, 100%);
  color: #22324b;
  font-weight: 750;
}

.v2-repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  color: #64758b;
  font-size: .82rem;
  font-weight: 500;
}

.v2-repo-header-menu {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tblr-border-radius);
  padding: 0;
}

.v2-repo-header-menu i {
  font-size: 1.25rem;
}

.v2-repo-header-dropdown {
  min-width: 15.5rem;
  padding: .45rem;
  border-radius: 1rem;
}

.v2-repo-header-dropdown .dropdown-item {
  border-radius: .75rem;
  padding: .62rem .8rem;
  font-weight: 600;
}

.v2-repo-scroll {
  max-height: 62vh;
  overflow: auto;
}

.v2-repo-scroll--wide {
  max-height: none;
}

.v2-repo-hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.v2-repo-hero-btn {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, .28);
  background: #fff;
  padding: 0;
  border-radius: 1rem;
  text-align: inherit;
  white-space: normal;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.v2-repo-hero-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, .1);
  border-color: rgba(37, 99, 235, .28);
}

.v2-repo-hero-btn--featured {
  border-color: rgba(37, 99, 235, .42);
  background: linear-gradient(180deg, rgba(239, 246, 255, .95), rgba(248, 250, 252, .98));
  box-shadow: 0 18px 34px rgba(37, 99, 235, .12);
}

.v2-repo-hero-btn-icon {
  width: 3.35rem;
  height: 3.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, .1);
  flex: 0 0 auto;
  font-size: 1.28rem;
  color: #2563eb;
}

.v2-repo-hero-btn-body {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-width: 0;
  align-items: center;
  justify-content: center;
  min-height: 8.25rem;
  padding: 1.55rem 1.35rem;
}

.v2-repo-hero-btn-title {
  font-weight: 700;
  line-height: 1.2;
  font-size: 1.08rem;
  color: #22324b;
}

.v2-repo-stat-card {
  border-radius: 1.15rem;
  overflow: hidden;
}

.v2-repo-stat-badge {
  border: 0;
  font-weight: 700;
  background: rgba(37, 99, 235, .12);
  color: #2563eb;
}

.v2-repo-stat-value {
  font-size: clamp(1.65rem, 2vw, 2.1rem);
  line-height: 1.05;
  font-weight: 760;
  letter-spacing: -.03em;
  margin-bottom: .55rem;
  color: #1f2a44;
}

.v2-repo-sparkline {
  height: 44px;
  margin: .2rem 0 .5rem;
}

.v2-repo-sparkline svg {
  display: block;
  width: 100%;
  height: 100%;
}

.v2-repo-progress-wrap {
  display: grid;
  gap: .35rem;
}

.v2-repo-stat-meta-list {
  display: grid;
  gap: .65rem;
}

.v2-repo-stat-meta-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .4rem;
  border-top: 1px solid rgba(15, 23, 42, .06);
  font-size: .82rem;
  color: #64758b;
}

.v2-repo-stat-meta-item:first-child {
  border-top: 0;
  padding-top: .1rem;
}

.v2-repo-stat-meta-item strong {
  color: #22324b;
  font-size: .9rem;
}

.v2-repo-contributor-cluster {
  display: grid;
  gap: .8rem;
  margin-bottom: .8rem;
}

.v2-repo-avatar-stack {
  display: flex;
  align-items: center;
}

.v2-repo-avatar-stack .avatar {
  width: 2rem;
  height: 2rem;
  margin-right: -.45rem;
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
}

.v2-repo-avatar-stack .avatar:last-child {
  margin-right: 0;
}

.v2-repo-contributor-cluster-text {
  font-size: .84rem;
  line-height: 1.5;
  color: #64758b;
}

.v2-repo-segmented {
  display: grid;
  gap: .7rem;
}

.v2-repo-segmented-bar {
  height: .7rem;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .16);
}

.v2-repo-segmented-bar > span {
  display: block;
  height: 100%;
}

.v2-repo-segmented-legend {
  display: grid;
  gap: .45rem;
}

.v2-repo-segmented-legend-item {
  display: grid;
  grid-template-columns: .6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: #64758b;
}

.v2-repo-segmented-legend-item strong {
  color: #22324b;
  font-size: .86rem;
}

.v2-repo-segmented-dot {
  width: .6rem;
  height: .6rem;
  border-radius: 999px;
}

.v2-repo-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #64758b;
  text-transform: uppercase;
}

.v2-repo-progress {
  height: .45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, .16);
  overflow: hidden;
}

.v2-repo-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.v2-repo-card {
  border-radius: 1.1rem;
}

.v2-repo-card-top {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
}

.v2-repo-card-mark {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: .04em;
  flex: 0 0 auto;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
}

.v2-repo-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  color: #64758b;
  font-size: .84rem;
  font-weight: 600;
}

.v2-repo-empty-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .9rem;
  background: rgba(var(--tblr-primary-rgb), .08);
  color: var(--tblr-primary);
  font-size: 1.5rem;
}

.v2-repo-modal-frame .card {
  margin-bottom: 0;
}

.v2-repo-modal-grid {
  --tblr-gutter-y: 1rem;
}

.v2-repo-tree-level {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1rem;
}

.v2-repo-tree-item {
  margin: 0;
  padding: 0;
}

.v2-repo-tree-row {
  display: flex;
  align-items: center;
  gap: .15rem;
}

.v2-repo-tree-link {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .6rem;
  border-radius: .75rem;
  color: var(--tblr-body-color);
  text-decoration: none;
  font-size: .92rem;
  line-height: 1.35;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.v2-repo-tree-link:hover,
.v2-repo-tree-link.active,
.v2-repo-tree-row.active .v2-repo-tree-link--folder {
  background: rgba(var(--tblr-primary-rgb), .08);
  color: var(--tblr-primary);
}

.v2-repo-tree-link--folder {
  flex: 1 1 auto;
}

.v2-repo-tree-link--file {
  font-size: .88rem;
}

.v2-repo-tree-toggle {
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #64758b;
  border-radius: .6rem;
}

.v2-repo-tree-toggle:hover {
  background: rgba(var(--tblr-primary-rgb), .06);
  color: var(--tblr-primary);
}

.v2-repo-tree-toggle[aria-expanded="true"] i {
  transform: rotate(90deg);
}

.v2-repo-tree-toggle i {
  transition: transform .18s ease;
}

.v2-repo-tree-toggle.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.v2-repo-tree-children {
  padding-left: .25rem;
}

.v2-repo-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
  font-size: .875rem;
  color: var(--tblr-secondary);
}

.v2-repo-breadcrumb-link {
  color: inherit;
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 0;
}

.v2-repo-breadcrumb-link:hover {
  color: var(--tblr-primary);
}

.v2-repo-table-entry {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: inherit;
  text-decoration: none;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.v2-repo-entry-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .7rem;
  background: rgba(var(--tblr-primary-rgb), .08);
  color: var(--tblr-primary);
  flex: 0 0 auto;
}

.v2-repo-change-link {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.v2-repo-change-link:hover {
  color: var(--tblr-primary);
}

.v2-repo-change-link > span:last-child {
  min-width: 0;
  display: grid;
  gap: .18rem;
}

.v2-repo-change-path,
.v2-repo-change-location,
.v2-repo-change-detail {
  display: block;
  color: #64758b;
  font-size: .78rem;
  line-height: 1.45;
}

.v2-repo-change-path,
.v2-repo-change-location {
  word-break: break-word;
}

.v2-repo-change-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  flex-wrap: wrap;
  background: rgba(248, 250, 252, .72);
}

.v2-repo-diff {
  border: 1px solid var(--tblr-border-color);
  border-radius: .9rem;
  overflow: hidden;
  background: #fff;
}

.v2-repo-diff-line {
  display: grid;
  grid-template-columns: 3.5rem 3.5rem minmax(0, 1fr);
  gap: .75rem;
  padding: .35rem .85rem;
  border-top: 1px solid rgba(15, 23, 42, .06);
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .825rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.v2-repo-diff-line:first-child {
  border-top: 0;
}

.v2-repo-diff-line--added {
  background: rgba(34, 197, 94, .09);
}

.v2-repo-diff-line--removed {
  background: rgba(239, 68, 68, .08);
}

.v2-repo-diff-no {
  color: var(--tblr-secondary);
  text-align: right;
}

.v2-repo-diff-code {
  min-width: 0;
}

.v2-repo-history-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.v2-repo-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: .9rem;
  background: #fff;
}

.v2-repo-file-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: .95rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, .92), rgba(244, 247, 251, .82));
}

.v2-repo-file-meta-main {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  min-width: 0;
}

.v2-repo-file-meta-icon {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .85rem;
  background: rgba(var(--tblr-primary-rgb), .08);
  color: var(--tblr-primary);
  flex: 0 0 auto;
  font-size: 1rem;
}

.v2-repo-history-panel {
  padding: .95rem 1rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: .95rem;
  background: rgba(248, 250, 252, .72);
}

.v2-repo-history-panel--side {
  height: fit-content;
  max-height: min(68vh, 820px);
  overflow: auto;
}

.v2-repo-file-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.v2-repo-file-stage--history-open {
  grid-template-columns: minmax(0, 1fr) 23rem;
}

.v2-repo-file-main {
  min-width: 0;
}

.v2-repo-stats-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1rem;
}

.v2-repo-stats-box {
  padding: 1rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: .95rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, .92), rgba(244, 247, 251, .82));
}

.v2-repo-stats-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.v2-repo-stats-meta {
  padding: .9rem 1rem;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: .9rem;
  background: #fff;
}

.v2-repo-stats-label {
  display: block;
  margin-bottom: .35rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tblr-secondary);
}

.v2-repo-stats-value {
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tblr-body-color);
}

.v2-repo-stats-subvalue {
  margin-top: .3rem;
  font-size: .85rem;
  color: var(--tblr-secondary);
}

.v2-repo-contributor-list {
  display: flex;
  flex-direction: column;
}

.v2-repo-contributor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
  border-top: 1px solid rgba(15, 23, 42, .08);
}

.v2-repo-contributor-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.v2-repo-contributor-item:last-child {
  padding-bottom: 0;
}

.v2-repo-contributor-item .v2-user-inline {
  min-width: 0;
}

.v2-repo-contributor-item .v2-user-inline-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-repo-modal-loader {
  min-height: 18rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.v2-code-preview {
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: .95rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f9fbfd, #f4f7fb);
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .765rem;
  line-height: 1.15;
  max-height: min(60vh, 720px);
  overflow: auto;
}

.v2-code-preview-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.v2-code-preview-line {
  height: auto;
}

@media (max-width: 991.98px) {
  .v2-repo-shell--header,
  .v2-repo-shell--canvas {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .v2-repo-stats-layout {
    grid-template-columns: 1fr;
  }

  .v2-repo-file-stage--history-open {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .v2-repo-stats-meta-grid {
    grid-template-columns: 1fr;
  }

  .v2-repo-hero-actions {
    grid-template-columns: 1fr;
  }

  .v2-repo-header-row {
    align-items: stretch;
  }

  .v2-repo-header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.v2-code-preview-line:first-child td {
  border-top: 0;
}

.v2-code-preview-no {
  width: 2.65rem;
  padding: .12rem .65rem .12rem .75rem;
  border-top: 1px solid rgba(15, 23, 42, .05);
  color: var(--tblr-secondary);
  text-align: right;
  user-select: none;
  vertical-align: top;
  white-space: nowrap;
  font-size: .72rem;
  line-height: 1.15;
  margin: 0;
}

.v2-code-preview-code {
  width: 100%;
  padding: .12rem .75rem .12rem 0;
  border-top: 1px solid rgba(15, 23, 42, .05);
  vertical-align: top;
}

.v2-code-preview-text {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  white-space: pre;
  overflow: visible;
  word-break: normal;
  line-height: 1.15;
}

.v2-code-preview-text--empty {
  min-height: 1.15em;
}

.v2-repo-binary-preview {
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: .95rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f9fbfd, #f4f7fb);
}

.v2-repo-binary-preview--image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 18rem;
  max-height: min(60vh, 720px);
  padding: 1rem;
}

.v2-repo-binary-preview--image img {
  display: block;
  max-width: 100%;
  max-height: calc(min(60vh, 720px) - 2rem);
  object-fit: contain;
  border-radius: .6rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
  background: #fff;
}

.v2-repo-binary-preview--pdf {
  height: min(68vh, 780px);
}

.v2-repo-binary-preview--pdf iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.v2-repo-side-diff {
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: .95rem;
  overflow: hidden;
  background: #fff;
  max-height: min(60vh, 760px);
  overflow: auto;
}

.v2-repo-side-diff-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  background: rgba(15, 23, 42, .08);
}

.v2-repo-side-diff-head > div {
  padding: .75rem .95rem;
  background: rgba(246, 248, 252, 1);
  font-size: .85rem;
  font-weight: 600;
  color: var(--tblr-secondary);
}

.v2-repo-side-diff-body {
  display: flex;
  flex-direction: column;
}

.v2-repo-side-diff-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  background: rgba(15, 23, 42, .08);
}

.v2-repo-side-diff-cell {
  display: grid;
  grid-template-columns: 2.55rem minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
  padding: .12rem .75rem;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .765rem;
  line-height: 1.15;
}

.v2-repo-side-diff-cell--removed {
  background: rgba(239, 68, 68, .12);
  box-shadow: inset 3px 0 0 #ef4444;
}

.v2-repo-side-diff-cell--added {
  background: rgba(34, 197, 94, .13);
  box-shadow: inset 3px 0 0 #22c55e;
}

.v2-repo-side-diff-cell--unchanged {
  background: #fcfcfd;
}

.v2-repo-side-diff-cell--empty {
  background: rgba(248, 250, 252, .9);
}

.v2-repo-side-diff-no {
  color: var(--tblr-secondary);
  text-align: right;
  user-select: none;
  font-size: .72rem;
  line-height: 1.15;
  padding: 0;
  margin: 0;
}

.v2-repo-side-diff-text {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  white-space: pre;
  overflow: visible;
  word-break: normal;
  line-height: 1.15;
}

.v2-repo-side-diff-text--empty {
  min-height: 1.15em;
}

@media (max-width: 1199.98px) {
  .v2-repo-scroll {
    max-height: none;
  }
}

@media (max-width: 991.98px) {
  .v2-repo-file-meta {
    flex-direction: column;
  }

  .v2-repo-file-meta-main {
    width: 100%;
  }

  .v2-repo-side-diff-head,
  .v2-repo-side-diff-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-repo-history-panel--side {
    max-height: none;
  }
}
